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 | |
# this bash is base on https://developer.github.com/v3/users/keys/#create-a-public-key | |
username='yourname' | |
password='yourpassword' | |
id_to_delete='123' | |
curl -X DELETE https://api.github.com/user/keys/$id_to_delete -u "$username:$password" |
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 pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=True) |
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 com.argcv.demo; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
public class MultiThreadDemo { | |
int counter = 0; | |
public class InsertThread extends Thread { |
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
public void insertBatch(List<AcmAuthor2paper> objList) { | |
String sql = String.format("INSERT INTO %s.author2paper(id,aid,pid,position) VALUES (?,?,?,?)", dbName); | |
DBConnection conn = pool.getConnection(); | |
PreparedStatement ps = null; | |
try { | |
conn.setAutoCommit(false); | |
ps = conn.prepareStatement(sql); | |
for (AcmAuthor2paper obj : objList) { | |
_constructPS(ps, obj); |
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
// for http://fun.coolshell.cn/unix.html | |
#include <stdio.h> | |
#include <string.h> | |
int main() | |
{ | |
char * seq1 = "pvwdgazxubqfsnrhocitlkeymj"; | |
char seq[32] = ""; | |
for(int i = 0 ; i < strlen(seq1) ; i ++) | |
{ |
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
# Dropbox | |
108.160.165.62 dropbox.com | |
108.160.166.62 dropbox.com | |
108.160.167.205 www.dropbox.com | |
23.21.206.219 forums.dropbox.com | |
23.23.104.199 dl.dropboxusercontent.com | |
108.160.166.189 d.dropbox.com | |
108.160.166.12 client-lb.dropbox.com | |
204.236.220.7 dl-client1.dropbox.com | |
204.236.220.9 dl-client2.dropbox.com |
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
/** | |
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed | |
*/ | |
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createE |
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
<?php | |
/* | |
Author: Jim Westergren & Jeedo Aquino | |
File: index-with-redis.php | |
Updated: 2012-10-25 | |
This is a redis caching system for wordpress. | |
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/ |
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
// get start from http://leveldb.googlecode.com/svn/trunk/doc/index.html | |
#include <iostream> | |
#include <algorithm> | |
#include <string> | |
#include "leveldb/db.h" | |
#include "leveldb/cache.h" | |
#include "leveldb/options.h" | |
int main() | |
{ |
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
// MersenneTwister.h | |
// Mersenne Twister random number generator -- a C++ class MTRand | |
// Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus | |
// Richard J. Wagner v1.1 28 September 2009 [email protected] | |
// The Mersenne Twister is an algorithm for generating random numbers. It | |
// was designed with consideration of the flaws in various other generators. | |
// The period, 2^19937-1, and the order of equidistribution, 623 dimensions, | |
// are far greater. The generator is also fast; it avoids multiplication and | |
// division, and it benefits from caches and pipelines. For more information |