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/sh | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ] |
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
// 示例代码 | |
class SampleSM { | |
... | |
public byte[] generateUnpayMACImpl(byte[] data, SecureDESKey kd) | |
throws SMException { | |
data = ISOUtil.concat(data, new byte[8]); | |
int len = data.length - data.length % 8; | |
if (data.length != len) { |
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
class ReplayPlugin extends Plugin | |
constructor: (@widget) -> | |
super @widget | |
@editor = @widget | |
$('.bbp-admin-links a').on 'click', (e) => | |
node = $(e.currentTarget).parent().parent().find('.bbp-author-name').clone() | |
node.text '@'+node.text() | |
@editor.trigger 'focus' | |
@editor.selection.insertNode node.append(' ') |
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 socks5 | |
import ( | |
"net" | |
"time" | |
"bytes" | |
"errors" | |
"bufio" | |
"strconv" | |
"strings" |
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
if (/(10\.\d{1,3}\.\d{1,3}\.\d{1,3})|(172\.(1[6789]|2[0-9]|3[01])\.\d{1,3}\.\d{1,3})|(192\.168\.\d{1,3}\.\d{1,3})/.test(ipAddr)) { | |
// Successful match | |
} else { | |
// Match attempt failed | |
} |
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 idx = 0; | |
var hrefPool = new Array(); | |
hrefPool.push('/signup'); | |
hrefPool.push('/signin'); | |
hrefPool.push('/signout'); | |
$('a').each(function(){ | |
var href = $(this).attr('href'); | |
if (href.indexOf('http') != -1) { | |
return |
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
[isayme] | |
text(bold)=eaeaea | |
magenta(bold)=ff00ff | |
text=ffffff | |
white(bold)=eaeaea | |
green=00c000 | |
red(bold)=d20000 | |
green(bold)=00ff00 | |
black(bold)=808080 | |
red=c00000 |
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
// clone this gist to a empty folder, the run: | |
// npm init (and follow steps) | |
// npm install express --save | |
// npm install swig --save | |
// node app.js and open http://localhost:3000 | |
function App() { | |
var express = require('express'); |
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
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |