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
| /** | |
| RGB introduce: | |
| https://baike.baidu.com/item/BMP/35116?fr=aladdin | |
| https://www.cnblogs.com/lzlsky/archive/2012/08/16/2641698.html | |
| WINGDI.h | |
| **/ | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
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
| upstream railsapp { | |
| server unix:/home/appuser/app/shared/pids/unicorn.socket; | |
| } | |
| server { | |
| listen 80; | |
| server_name localhost; | |
| location / { | |
| root /home/appuser/app/current/public/; |
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
| user nobody http; | |
| worker_processes 8; | |
| error_log /var/log/nginx-error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
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 |
NewerOlder