Skip to content

Instantly share code, notes, and snippets.

View fzerorubigd's full-sized avatar
🤷‍♂️
/shrug

Forud fzerorubigd

🤷‍♂️
/shrug
View GitHub Profile
@fzerorubigd
fzerorubigd / tmux.conf
Last active August 29, 2015 14:16
My tmux conf
unbind C-b
set -g prefix C-b
#urxvt tab like window switching (-n: no prior escape seq)
bind -n M-down new-window
bind -n M-left prev
bind -n M-right next
#bind -n C-left swap-window -t -1
#bind -n C-right swap-window -t +1
// Package multilock provide A simple method to lock base on a holder
package multilock
import (
"errors"
"sync"
)
type refCounter struct {
counter int
// Package multilock provide A simple method to lock base on a holder
package multilock
import (
"errors"
"sync"
)
type refCounter struct {
counter int
#!/bin/bash
set -euo pipefail
# Change mirrors to iran, its hard to be in other-side-of-fuckin-firewall
bash -c 'echo -e "deb http://debian.asis.io/debian/ wheezy main\ndeb http://debian.asis.io/debian/ wheezy-updates main\ndeb http://security.debian.org wheezy/updates main" > /etc/apt/sources.list'
bash -c 'echo "deb http://debian.asis.io/debian/ wheezy-backports main" >> /etc/apt/sources.list'
apt-get -y update
apt-get -y install apt-utils dialog wget curl sudo
bash -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list'
unbind C-b
set -g prefix C-b
#urxvt tab like window switching (-n: no prior escape seq)
bind -n M-down new-window
bind -n M-left prev
bind -n M-right next
#bind -n C-left swap-window -t -1
#bind -n C-right swap-window -t +1
<?php
$a = false || true;
$b = false or true;
var_dump($a);
var_dump($b);
@fzerorubigd
fzerorubigd / persian.py
Last active August 29, 2015 14:19
~/.thefuck/rules/persian.py
# coding=utf-8
local_charlist = {u'،':'&' , u'×':'^' , u'٪':'%' , u'﷼':'$' , u'٫':'#' , u'٬':'@' , u'!':'!' , u'۰':'0' , u'۹':'9' , u'۸':'8' , u'۷':'7' , u'۶':'6' , u'۵':'5' , u'۴':'4' , u'۳':'3' , u'۲':'2' , u'۱':'1' , u'و':',' , u'پ':'m' , u'د':'n' , u'ذ':'b' , u'ر':'v' , u'ز':'c' , u'ط':'x' , u'ظ':'z' , u'گ':'\'' , u'ک':';' , u'م':'l' , u'ن':'k' , u'ت':'j' , u'ا':'h' , u'ل':'g' , u'ب':'f' , u'ی':'d' , u'س':'s' , u'ش':'a' , u'چ':']' , u'ج':'[' , u'ح':'p' , u'خ':'o' , u'ه':'i' , u'ع':'u' , u'غ':'y' , u'ف':'t' , u'ق':'r' , u'ث':'e' , u'ص':'w' , u'ض':'q' }
def match(command, settings):
c = command.script
return c[0] in local_charlist
def get_new_command(command, settings):
res = ""
@fzerorubigd
fzerorubigd / init.el
Created April 18, 2015 19:54
/home/f0rud/.emacs.d/init.el
;; emacs kicker --- kick start emacs setup
;; Copyright (C) 2010 Dimitri Fontaine
;;
;; Author: Dimitri Fontaine <[email protected]>
;; URL: https://github.com/dimitri/emacs-kicker
;; Created: 2011-04-15
;; Keywords: emacs setup el-get kick-start starter-kit
;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
;;
;; This file is NOT part of GNU Emacs.
@fzerorubigd
fzerorubigd / gbvendor.py
Last active August 29, 2015 14:21
~/.thefuck/rules/gbvendor.py
# a simple rule for thefuck (https://github.com/nvbn/thefuck) to handle the gb vendor in one fucking step :)
import re
def match(command, settings):
m = re.search(r'cannot find package "([^"]*)"', command.stdout)
return ('gb' in command.script
and m)
# I use submodule, but changing this to gb vendor is not hard at all :)
def get_new_command(command, settings):
code.google.com
googleapis.com
googleusercontent.com
ytimg.com
youtube.com
youtube-nocookie.com
bitbucket.org
thepiratebay.se
humblebundle.com
plus.url.google.com