This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkOrientation() { | |
var w,o,t; | |
w = window; | |
o = (w.innerWidth > w.innerHeight) ? 'landscape' : 'portrait'; | |
t = _gat._getTrackers()[0]; | |
if (typeof(w.gao) == 'undefined') { | |
w.gao = o; | |
} else { | |
if (w.gao != o) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsRespond() { | |
var min_width, max_width, callback,arglen,width; | |
arglen = arguments.length; | |
width = window.innerWidth; | |
if (arglen == 2) { | |
min_width = 0; | |
max_width = arguments[0]; | |
callback = arguments[1]; | |
} else if (arglen == 3) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FontAwesome Variable List | |
* | |
* Usage: | |
* .input.username { | |
* &:before { | |
* font-family: $icon-font; | |
* content: $fa-user; | |
* } | |
* } | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var icons = {}; | |
var ignore = ['fa-lg', 'fa-fw', 'fa']; | |
$('.container i.fa').each(function() { | |
var val, icon_name, icon_value, i; | |
val = window.getComputedStyle($(this).get(0), ':before').getPropertyValue('content'); | |
icon_name = $(this).attr('class').split(' ')[1]; | |
console.log(icon_name); | |
charcode = val.charCodeAt(0).toString(16); | |
icons[icon_name] = charcode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -z "$1" ]; then | |
if [ ! -d "$1" ]; then | |
mkdir "$1" | |
mkdir "$1/bin" | |
mkdir "$1/docs" | |
mkdir "$1/tests" | |
mkdir "$1/$1" | |
touch "$1/README.md" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import * | |
env.roledefs = {} | |
env.passwords = {} | |
def patch_ssl(): | |
sudo('apt-get update') | |
sudo('apt-get install openssl1.0.0 -y') | |
sudo('/etc/init.d/apache2 restart') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitLab Fullscreen Diffs | |
// @version 0.1 | |
// @description Adds a 'fullscreen' button to GitLab diffs. | |
// @match http://* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @grant none | |
// ==/UserScript== | |
/** | |
* Be sure to change the @match param above to suit your needs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## INSTALL: | |
## | |
## 1A) git clone <GIT_URL> web_mode_gist && cd web_mode_gist | |
## OR | |
## 1B) wget <RAW_URL> | |
## 2. chmod +x emacs-web-mode.sh | |
## 3. ./emacs-web-mode.sh | |
## | |
EMACS="${HOME}/.emacs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W\}%c %{g}]' |
OlderNewer