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
{;; Currently, we support either "Markdown" or "Org". | |
;; This can overwrite your global preference so that | |
;; maybe your personal preferred format is Org but you'd | |
;; need to use Markdown for some projects. | |
;; :preferred-format "" | |
;; Preferred workflow style. | |
;; Value is either ":now" for NOW/LATER style, | |
;; or ":todo" for TODO/DOING style. | |
:preferred-workflow :now |
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
-Xms1024m | |
-Xmx3072m | |
-Xss64m | |
-Dfile.encoding=UTF-8 | |
-Djava.net.preferIPv4Stack=true | |
-Dsun.io.useCanonCaches=false | |
-XX:+AggressiveOpts | |
-XX:+AlwaysPreTouch | |
-XX:+CMSClassUnloadingEnabled | |
-XX:+CMSIncrementalMode |
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
# Install tmux 3.0a on Centos | |
# install deps | |
sudo yum install -y gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz | |
tar -xf libevent-2.1.11-stable.tar.gz | |
cd libevent-2.1.11-stable | |
./configure --prefix=/usr/local |
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-lock=false | |
registry="https://registry.npm.taobao.org" | |
disturl="https://npm.taobao.org/dist" | |
nvm_nodejs_org_mirror="http://npm.taobao.org/mirrors/node" | |
nodejs_org_mirror="http://npm.taobao.org/mirrors/node" | |
sass_binary_site="http://npm.taobao.org/mirrors/node-sass" | |
electron_mirror="http://npm.taobao.org/mirrors/electron/" | |
SQLITE3_BINARY_SITE="http://npm.taobao.org/mirrors/sqlite3" | |
profiler_binary_host_mirror="http://npm.taobao.org/mirrors/node-inspector/" | |
node_inspector_cdnurl="https://npm.taobao.org/mirrors/node-inspector" |
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
const stream = require('stream') | |
const readline = require('readline') | |
const AWS = require('aws-sdk') | |
const S3 = new AWS.S3() | |
// read S3 file by line | |
function createReadline(Bucket, Key) { | |
// s3 read stream | |
const input = S3 |
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
git clone https://github.com/rofl0r/proxychains-ng.git | |
cd proxychains-ng | |
./configure --prefix=/usr --sysconfdir=/etc | |
make | |
sudo make install | |
sudo make install-config | |
sudo nano /etc/proxychains.conf | |
add this code to the end of proxychains.conf: socks5 127.0.0.1 1080 | |
proxychains4 open -a /Applications/Backup\ and\ Sync.app |
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 com.google.protobuf.Empty; | |
import io.grpc.Channel; | |
import io.grpc.Server; | |
import io.grpc.inprocess.InProcessChannelBuilder; | |
import io.grpc.inprocess.InProcessServerBuilder; | |
import io.grpc.stub.ClientCallStreamObserver; | |
import io.grpc.stub.ClientResponseObserver; | |
import io.grpc.stub.ServerCallStreamObserver; | |
import io.grpc.stub.StreamObserver; |
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 config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
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 | |
// The aim of this example is to illustrate backpressure using golang channels and go routines. | |
// | |
// This is the basis for a simple data processing service which could either be reading from | |
// some internal queue or a socket of some sort. | |
import ( | |
"fmt" | |
"math/rand" |
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 | |
# coding: utf-8 | |
''' | |
auto switch keyboard between different applications | |
if you want to change the app list, modify the var 'ignore_list' | |
''' | |
from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey |
NewerOlder