Skip to content

Instantly share code, notes, and snippets.

Avatar

Reza Sadr wintorez

View GitHub Profile
@wintorez
wintorez / inject.js
Created Oct 6, 2017
Use these functions to inject JavaScript and StyleSheets using Console
View inject.js
var injectStyle = function(pathToStyle) {
var head = document.getElementsByTagName("head")[0];
var link = document.createElement("link");
link.type = "text/css";
link.rel = "stylesheet";
link.href = pathToStyle;
head.appendChild(link);
};
var injectScript = function(pathToScript) {
@wintorez
wintorez / .bash_profile
Created Oct 6, 2017
My default macOS .bash_profile
View .bash_profile
source ~/.git-prompt.sh
export PS1='\[\e[37m\]\w $(__git_ps1 "(%s)")\$\[\e[m\] '
export PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:$PATH"
eval "$(rbenv init -)"
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
@wintorez
wintorez / gmail_bookmarklet.txt
Last active Oct 18, 2017
Gmail bookmarklet
View gmail_bookmarklet.txt
javascript:(function()%7Bm='http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(document.location);w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function()%7Bw.focus();%7D, 250);%7D)();