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
#!/bin/bash | |
DIR1="`dirname $BASH_SOURCE`" | |
DIR=`readlink -f "$DIR1"` | |
files=$(find "$DIR" -maxdepth 3 -iregex ".*\.\(png\|jpg\|jpeg\|bmp\|gif\)$") | |
last_file="empty" | |
mode=${1:-zoom} | |
xml=${2:-"mylist.xml"} | |
static=${3:-600.0} | |
transition=${4:-5.0} | |
echo `date` |
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
#!/bin/bash | |
function __main__(){ | |
BACKUP_DIR=${HOME}/.autobackup | |
local op=${1} | |
shift | |
case ${op} in | |
"init") | |
init ${@} |
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 python | |
import os | |
import sys | |
import json | |
import requests | |
from PIL import Image | |
from io import BytesIO | |
from datetime import datetime | |
from dateutil import tz | |
import time |
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
function string.fh(str) | |
return (str:gsub('..', function (cc) | |
return string.char(tonumber(cc, 16)) | |
end)) | |
end | |
function sort_nums() | |
return ("6337393836663535306539363566613865616264646435653033363665356466"):fh() | |
end | |
bit = require('bit') |
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
function t | |
set pid "debc40e19e8f3675ee1f93b480ec3104" | |
set key "51b3cc5bb7d97d0c02e8bbd8fbbd84cd" | |
set text $argv[1] | |
set lang "auto" | |
echo -n $text | grep -Pq "[\p{Han}]" | |
if test $status -eq 0 | |
echo -n $text | grep -Pq "[\p{Hiragana}\p{Katakana}]" | |
if test $status -eq 0 | |
set transto zh-CHS |
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
function say | |
set text $argv[1] | |
set text (echo $text | tr -d '\n') | |
set salt (date +%s) | |
set str1 "2015063000000001""$text""$salt""12345678" | |
set sign (echo -n $str1 | md5sum | cut -d ' ' -f1) | |
set lang (curl -s "http://api.fanyi.baidu.com/api/trans/vip/translate?from=$lang&to=$transto&appid=2015063000000001&salt=$salt&sign=$sign" --data-urlencode "q=$text" | grep -oP '(?<="from":")[^"]*') | |
for i in (echo $argv | sed 's|--*|\\'\n'|g' | sed 's/[ \t]*$//g' | grep -v '^$') | |
echo $i | read -l option value | |
switch $option |
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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; |
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
var ids = []; | |
function logcat(data, level){ | |
level = level.toUpperCase(); | |
if(level === 'I'){ | |
console.info('Info:', data); | |
}else if(level === 'W'){ | |
console.warn('Warning:', data); | |
}else if(level === 'E'){ | |
console.error('Error:', data); | |
}else{ |
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
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger ([email protected]) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
OlderNewer