This file contains 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 time | |
import subprocess | |
import sys | |
import numpy as np | |
FPS = 25 | |
WIDTH = 1280 | |
HEIGHT = 720 |
This file contains 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
all: help | |
##@ General | |
# The help target prints out all targets with their descriptions organized | |
# beneath their categories. The categories are represented by '##@' and the | |
# target descriptions by '##'. The awk commands is responsible for reading the | |
# entire set of makefiles included in this invocation, looking for lines of the | |
# file as xyz: ## something, and then pretty-format the target and help. Then, | |
# if there's a line with ##@ something, that gets pretty-printed as a category. |
This file contains 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
AT=$(echo -n "$DATA" | openssl sha1 -hmac "$QINIU_SK" -binary | openssl base64 -e) | |
echo "$QINIU_AK:$AT" |
This file contains 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" | |
"log" | |
"net/http" | |
"os" | |
"github.com/hpcloud/tail" | |
) |
This file contains 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
printf "$1:$(openssl passwd -apr1 ${2})\n" |
This file contains 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
/** | |
<Gallery> | |
<Photo for="img in images"> | |
<img class="Photo-img" :src="img.url" /> | |
</Photo> | |
</Gallery> | |
**/ | |
.Gallery { | |
column-count: 5; |
This file contains 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
## ref: https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04 | |
#!/usr/bin/env bash | |
package=$1 | |
if [[ -z "$package" ]]; then | |
echo "usage: $0 <package-name>" | |
exit 1 | |
fi |
This file contains 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 string | |
from random import choice | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
KEY = ''.join([choice(string.printable) for i in range(16)]) | |
This file contains 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
# -*- coding: utf-8 -*- | |
import base64 | |
import json | |
import os | |
import pprint | |
import sys | |
import urllib2 | |
GITHUB_API = 'https://api.github.com' |
This file contains 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 sys | |
import time | |
def follow(filename): | |
log_file = open(filename, 'r') | |
log_file.seek(0, 2) | |
while True: | |
line = log_file.readline() | |
if not line: |
NewerOlder