Skip to content

Instantly share code, notes, and snippets.

nhm tanveer hossain khan (hasan) we4tech

Block or report user

Report or block we4tech

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname


cribbed from

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.


# Namespace for classes and modules that handle serving documentation over HTTP
rgreenjr / postgres_queries_and_commands.sql
Last active Oct 17, 2019
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
View gist:4353170
# basic pfctl control
# ==
# Related:
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
BrianWill / Go
Last active Jun 29, 2019
Go language overview for experienced programmers
View Go

The Go language for experienced programmers

Why use Go?

  • Like C, but with garbage collection, memory safety, and special mechanisms for concurrency
  • Pointers but no pointer arithmetic
  • No header files
  • Simple, clean syntax
  • Very fast native compilation (about as quick to edit code and restart as a dynamic language)
  • Easy-to-distribute executables
View .bash_aliases.wework
# User specific aliases and functions go here (override system defaults)
# Re-read stuff
alias init='source ~/.bashrc'
alias newalias='vi ~/.bash_aliases && init'
alias enwalias=newalias
alias hg='lh'
alias grep='grep --color' # shows matches in color
alias Less=less
View gvl_release.rb
require 'fiddle'
class GVL
handle = Fiddle::Handle::DEFAULT
address = handle['rb_thread_blocking_region']
func = address, [Fiddle::TYPE_VOIDP,
palkan / Gemfile
Last active Dec 12, 2018
RSpec profiling with RubyProf and StackProf
View Gemfile
gem 'stackprof', require: false
gem 'ruby-prof', require: false
hisea / nginx
Created Jan 1, 2012
ubuntu passenger nginx init.d script
View nginx
sudo cp nginx /etc/init.d/
sudo update-rc.d nginx defaults
sudo chmod +x /etc/init.d/nginx
/etc/init.d/nginx start
You can’t perform that action at this time.