Skip to content

Instantly share code, notes, and snippets.

View baghayi's full-sized avatar
🌴
On vacation

Hüsen Baghayi baghayi

🌴
On vacation
View GitHub Profile
@Circl3s
Circl3s / i3-popout.config
Created October 22, 2018 15:14
Pop-out player (or picture-in-picture, whatevs) for i3. Just slap in in the config and watch it do the magic. (For now works only on 1920x1080 xd)
# Pop-out player:
# Press mod+PageUp to pop out the current window: float it, resize it, stick it.
# Press mod+Shift+PageUp to enter edit mode.
bindsym $mod+Prior fullscreen disable, floating enable, resize set 576 324, sticky enable, move window to position 1322 735
bindsym $mod+Shift+Prior mode "$mode_popout"
set $mode_popout Pop-out player: (k) lower left, (l) lower right, (i) upper left, (o) upper right
mode "$mode_popout" {
# Change position
@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/
@shameerc
shameerc / .bashrc
Created September 3, 2012 10:09
Show Git branch name on shell prompt
# this will show current branch name of repository in shell prompt
# add this in ~/.bashrc
export PS1="\\[\033[1;55m\]\w\$(__git_ps1 ' [%s]') \$ "
@rk
rk / bcrypt.php
Last active January 4, 2018 13:15
Simple bcrypt object to wrap crypt() with.
<?php
// Originally by Andrew Moore
// Src: http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php/6337021#6337021
//
// Heavily modified by Robert Kosek, from data at php.net/crypt
class Bcrypt {
private $rounds;
private $prefix;
@thisivan
thisivan / .zshrc
Created February 11, 2011 22:07
Enable Vim mode in ZSH
# Enable Vim mode in ZSH
bindkey -v
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^E' edit-command-line # Opens Vim to edit current command line
bindkey '^R' history-incremental-search-backward # Perform backward search in command line history
bindkey '^S' history-incremental-search-forward # Perform forward search in command line history
bindkey '^P' history-search-backward # Go back/search in history (autocomplete)
bindkey '^N' history-search-forward # Go forward/search in history (autocomplete)