This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from PIL import Image | |
| from PIL.ImageOps import grayscale | |
| from watchdog.events import RegexMatchingEventHandler | |
| class ImagesEventHandler(RegexMatchingEventHandler): | |
| THUMBNAIL_SIZE = (128, 128) | |
| IMAGES_REGEX = [r".*[^_thumbnail]\.jpg$"] | |
| def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "log": { | |
| "access": "/var/log/v2ray/access.log", | |
| "error": "/var/log/v2ray/error.log", | |
| "loglevel": "warning" | |
| }, | |
| "inbound": { //理论最安全的方式 ws,有条件加上TLS | |
| "port": 20080, //开启的端口,建议实用caddy加上TLS加密 | |
| "protocol": "vmess", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "time" | |
| ) | |
| const ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Wire.h> | |
| #define OV7670_address 0x21 | |
| #ifndef cbi | |
| #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | |
| #endif | |
| #define vga 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from StringIO import StringIO | |
| import json | |
| import sys | |
| import subprocess | |
| import shutil | |
| def getParent(rootid, id): | |
| print "--> ", id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker build -t="rails" . | |
| FROM ubuntu:12.04 | |
| RUN apt-get update | |
| ## MYSQL | |
| RUN apt-get install -y -q mysql-client libmysqlclient-dev | |
| ## RUBY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
| # Uses curl to be compatible with machines that don't have wget by default | |
| LINODE_API_KEY=licensekey | |
| DOMAIN_ID=domainid | |
| RESOURCE_ID=resourceid | |
| WAN_IP=`curl -s ifconfig.me/ip` | |
| if [ -f $HOME/.wan_ip.txt ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # CentOS rbenv system wide installation script | |
| # Forked from https://gist.github.com/1237417 | |
| # Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
| # Install pre-requirements | |
| yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
| make bzip2 autoconf automake libtool bison iconv-devel git-core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| webserver: webserver.c libuv/libuv.a http-parser/http_parser.o | |
| gcc -I libuv/include \ | |
| -lrt -lm -lpthread -o \ | |
| webserver webserver.c \ | |
| libuv/libuv.a http-parser/http_parser.o | |
| libuv/libuv.a: | |
| $(MAKE) -C libuv | |
| http-parser/http_parser.o: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| # File: /etc/init.d/unicorn | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs $network $syslog |
NewerOlder