Skip to content

Instantly share code, notes, and snippets.

anhhh11 / aria2.daemon
Created Mar 29, 2019 — forked from h0tw1r3/aria2.daemon
Aria2c systemd service
View aria2.daemon
View backup folder
tar pczf ui.tar.gz ./ --exclude="**/node_modules" --exclude="**/__build__" --exluce="**/logs"
anhhh11 / config
Created Apr 28, 2018 — forked from rbialek/config
View config
User git
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
anhhh11 / test-simple-http-data.js
Created Aug 9, 2016 — forked from murvinlai/test-simple-http-data.js
Socket Hang up problem - A sample to generate the problem.
View test-simple-http-data.js
* This is a simple HTTP data generator for testing.
var http = require('http');
var counter = 0;
http.createServer(function (req, res) {
var start = new Date();
View Atom useful package
# From
apm install simple-drag-drop-text git-plus tortoise-svn vim-mode merge-conflicts color-picker emmet docblockr pigments linter autocomplete-modules auto-update-packages file-icons minimap project-manager
apm install browser-plus terminal-plus git-time-machine expand-selection-to-quotes grammar-token-limit swackets recent-files-fuzzy-finder tree-view-git-status
apm install react tortoise-svn atom-beautify autoclose-html
apm list --installed --bare > package-list.txt
apm install --packages-file package-list.txt
anhhh11 /
Created Feb 15, 2016 — forked from zaim/
Thunkify Rethinkdb


Thunkify rethinkdb

To be used with co and/or koa.

So that we can do something like:

var r = require('rethunkdb')  // not a typo, might use other name if too close :)
View OOP in JS.js
var Pen = function(position){
this.position = position;
Pen.prototype.move = function(toPostition){
this.position = position
} = function(select){ = select;
Pen.prototype.toJSON = function(){
View index.html
<!DOCTYPE html>
<script src=""></script>
<meta charset="utf-8">
<title>JS Bin</title>
<div id="box">Hello</div>
<script id="jsbin-javascript">
View Tesseract - OCR
gs -sDEVICE=tiffgray -dNOPAUSE -r300 -sOutputFile="o-%04d.tiff" ./ttnt.pdf -c quit
for i in *.tif ; do tesseract $i $i -l vie -psm 1 ; done
mkdir done
for i in *.tiff;do if [ -f $i.txt ];then mv $i.txt done/;mv $i done/;fi;done
gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -r300 -sOutputFile="o-%04d.jpeg" ./ttnt.pdf -q -c quit
for i in done/*.txt; do j="`basename -s .tiff.txt $i`.jpeg";if [ -f $j ];then rm -f $j;fi; done
for i in *.jpeg ; do tesseract $i $i -l vie; done