Skip to content

Instantly share code, notes, and snippets.

@tuanle
tuanle / Random-string
Created October 16, 2018 03:37 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@tuanle
tuanle / gitflow-breakdown.md
Created August 14, 2018 08:49 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@tuanle
tuanle / 01.gitflow.md
Last active September 10, 2020 09:23
git_flow

Git flow

1, Tổng quan

Tài liệu này mô tả các vấn đề:

  • Mô hình branch
  • Trình tự thực hiện một task
  • Các lệnh git thường gặp
@tuanle
tuanle / tweak_ubuntu_gnome.sh
Last active December 13, 2015 13:30
Tweak ubuntu (gnome)
# Install numix theme
sudo add-apt-repository ppa:numix/ppa
sudo apt-get update && sudo apt-get install numix-gtk-theme
# After install numix, maybe using tweak ubuntu to change it, http://ubuntu-tweak.com/
# Remove windows's titlebar
# Ref: http://askubuntu.com/questions/289940/remove-title-bar-of-all-maximized-gnome-3-8-windows
sudo vi /usr/share/themes/Numix/metacity-1/metacity-theme-3.xml
# Change frame_geometry name="max" to frame_geometry name="max" has_title="false"
#!/usr/bin/env bash
# Wayback machine downloader
#TODO: Remove redundancy (download only newest files in given time period - not all of them and then write over them)
############################
clear
#Enter domain without http:// and www.
domain="google.com"
#Set matchType to "prefix" if you have multiple subdomains, or "exact" if you want only one page
matchType="domain"
@tuanle
tuanle / waybackmachine.sh
Created October 8, 2015 03:46
Download archived web from web.archive.org
#!/usr/bin/env bash
# Wayback machine downloader
#TODO: Remove redundancy (download only newest files in given time period - not all of them and then write over them)
############################
clear
#Enter domain without http:// and www.
domain="google.com"
#Set matchType to "prefix" if you have multiple subdomains, or "exact" if you want only one page
matchType="domain"
@tuanle
tuanle / httpd_mod_proxy_wstunnel.txt
Last active August 30, 2021 11:06
Configuring to run php ratchet websocket via SSL connect (using Apache2 proxy)
# Check http version or apache2 version
httpd -v # apache2 -v
# Building mod_proxy_wstunnel.so for httpd 2.2.x
# Check apache version (should be 2.2.20 as of writing, if not adjust the next step)
dpkg -s apache2
# Checkout apache source
svn checkout http://svn.apache.org/repos/asf/httpd/httpd/tags/2.2.x/ httpd-2.2.x
@tuanle
tuanle / Sublime Text License Key.md
Created October 3, 2015 14:50
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.

Sublime Text 2 & 3 License Key, Sublime Text Full Version

Sublime Text License Key

How to activate license key

  1. Go to menu Help > Enter License.
  2. Copy the license key below and paste it into the textbox > Click the Use License button.
  3. Enjoy! 👍
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install freshplayerplugin
This will install pepper flash(google chrome's flash player) to firefox.
@tuanle
tuanle / fix_hidden_files.txt
Created September 30, 2015 03:09
Fix show hidden files by default in ubuntu
open terminal and type:
dconf-editor
Enter and then:
org->gtk->settings->file-chooser
uncheck show-hidden