Skip to content

Instantly share code, notes, and snippets.

@anhhh11
anhhh11 / ba.sh
Created July 21, 2023 13:04 — forked from bvolpato/ba.sh
Install Chrome Driver with Xvfb (Ubuntu Server)
#!/bin/bash
# Chrome Repo
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get update
# Download
@anhhh11
anhhh11 / install-docker.md
Created April 11, 2022 03:44 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@anhhh11
anhhh11 / aria2.daemon
Created March 29, 2019 17:25 — forked from h0tw1r3/aria2.daemon
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=trunc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
tar pczf ui.tar.gz ./ --exclude="**/node_modules" --exclude="**/__build__" --exluce="**/logs"
@anhhh11
anhhh11 / config
Created April 28, 2018 02:35 — forked from rbialek/config
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa
@anhhh11
anhhh11 / tmux-cheatsheet.markdown
Created January 24, 2018 16:17 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@anhhh11
anhhh11 / test-simple-http-data.js
Created August 9, 2016 07:33 — forked from murvinlai/test-simple-http-data.js
Socket Hang up problem - A sample to generate the problem.
/*
* 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();
# From https://scotch.io/bar-talk/best-of-atom-features-plugins-acting-like-sublime-text
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
anhhh11 / README.md
Created February 15, 2016 15:27 — forked from zaim/README.md
Thunkify Rethinkdb

rethunkdb

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 :)
var Pen = function(position){
this.position = position;
}
Pen.prototype.move = function(toPostition){
this.position = position
}
Pen.prototype.select = function(select){
this.select = select;
}
Pen.prototype.toJSON = function(){