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
/** | |
* $ npm i jimp | |
* | |
* Copied from https://stackoverflow.com/a/48158807 | |
*/ | |
const fs = require('fs') | |
const util = require('util') | |
const Jimp = require('jimp') |
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
#!/usr/bin/env sh | |
[ $(id -u) -eq 0 ] || sh_c=sudo | |
do_it() { | |
#if [ ! $(id -u) -eq 0 ]; then | |
# echo Sorry but I require root privileges. | |
# 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
#!/usr/bin/env sh | |
# certbot certonly --manual --preferred-challenges=dns-01 --server=https://acme-v02.api.letsencrypt.org/directory | |
set -x | |
new () { | |
docker run --rm -it \ | |
-v "$(pwd)":/etc/letsencrypt \ | |
certbot/certbot \ |
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
ENTRYPOINT [ "/entrypoint.sh" ] |
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
// cheater for http://www.cuishuai.cc/game/ | |
// use it in console of Chrome DevTools | |
function play() { | |
const box = document.getElementById('box') | |
const girds = box.children | |
const num = box.childElementCount |
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
#!/usr/bin/env bash | |
ps aux | grep "[0-9] ssh -qTfNn -D 7070" |
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
#!/usr/bin/env bash | |
cd $1 | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
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
######################################################################################################### | |
## This is an example .gitignore file for Vivado, please treat it as an example as | |
## it might not be complete. In addition, XAPP 1165 should be followed. | |
######################################################################################################### | |
######### | |
#Exclude all | |
######### | |
* | |
!*/ | |
!.gitignore |
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
#!/usr/bin/env bash | |
outdir=$2 | |
function travel() { | |
mkdir -p $outdir/$1 | |
for f in `ls $1` | |
do | |
if [ -d $1/$f ]; then | |
travel $1/$f |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Game</title> | |
<style> | |
body { | |
background-color: black; | |
color: green; | |
} | |
.withborder { |