Skip to content

Instantly share code, notes, and snippets.

View achmiral's full-sized avatar
🏠
WFH

Miral Achmed achmiral

🏠
WFH
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@achmiral
achmiral / .gitignore
Created June 20, 2016 10:27 — forked from kogakure/.gitignore
Git: .gitignore file for LaTeX projects
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@achmiral
achmiral / seeds.rb
Created March 21, 2016 15:36 — forked from seyhunak/seeds.rb
Rails - Import SQL file as seed
unless Rails.env.production?
connection = ActiveRecord::Base.connection
connection.tables.each do |table|
connection.execute("TRUNCATE #{table}") unless table == "schema_migrations"
end
sql = File.read('db/import.sql')
statements = sql.split(/;$/)
statements.pop

1xx Informational

Status Code Status Message Symbol
100 Continue :continue
101 Switching Protocols :switching_protocols
102 Processing :processing

2xx Success

Status Code Status Message Symbol
@achmiral
achmiral / tmux_install.sh
Created December 3, 2016 03:11 — forked from mirskiy/tmux_install.sh
Install tmux 2.2 on Ubuntu 14.04 from source
sudo apt-get update
sudo apt-get install -y libevent-dev libncurses-dev make
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
tar xvzf tmux-2.2.tar.gz
cd tmux-2.2/
./configure && make
sudo make install
@achmiral
achmiral / default
Created January 2, 2017 12:22
Nginx configuration for rails production environment
upstream app {
# Path to Puma SOCK file, as defined previously
server unix:/home/deploy/appname/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
root /home/deploy/appname/public;
@achmiral
achmiral / ip_forward.md
Created May 5, 2017 11:38 — forked from tzermias/ip_forward.md
Forward traffic from wlan0 to eth0 interface

Forward traffic from a laptop's eth0 to wlan0

###To laptop

Specify an IP address to eth0 (here 192.168.56.1)

sudo ifconfig eth0 192.168.56.1 netmask 255.255.255.0
@achmiral
achmiral / markup
Created May 5, 2017 12:19 — forked from petehouston/markup
[Bootstrap] Text overlay center inside the image
<div class="row" id="box-search">
<div class="thumbnail text-center">
<img src="img/cafe.jpg" alt="" class="img-responsive">
<div class="caption">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab, quisquam?</p>
</div>
</div>
</div>
@achmiral
achmiral / hosts
Created May 8, 2017 15:46 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo and Reddit
# ---------------------------------------------------
# Vimeo
# ---------------------------------------------------
104.156.85.217 vimeo.com
23.214.58.223 secure-c.vimeocdn.com
74.113.233.128 developer.vimeo.com
23.235.43.143 i.vimeocdn.com
23.235.43.143 f.vimeocdn.com
80.239.137.98 a.vimeocdn.com
@achmiral
achmiral / gist:7995b056dd1b47802279cd65ea69d787
Created September 14, 2017 16:22 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: