This file contains 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 applycss(css){ | |
var head = document.getElementsByTagName('head')[0]; | |
var s = document.createElement('style'); | |
s.setAttribute('type', 'text/css'); | |
s.appendChild(document.createTextNode(css)); | |
head.appendChild(s); | |
} | |
applycss(` | |
body, | |
.modal-content { |
This file contains 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 applycss(css){ | |
var head = document.getElementsByTagName('head')[0]; | |
var s = document.createElement('style'); | |
s.setAttribute('type', 'text/css'); | |
s.appendChild(document.createTextNode(css)); | |
head.appendChild(s); | |
} | |
applycss(` | |
/** | |
* Everything you need to know is below: |
This file contains 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
#include <SoftwareSerial.h> | |
SoftwareSerial ESP8266(2, 3); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); //HARDWARE | |
ESP8266.begin(9600);//SOFTWARE | |
enviar_dato("AT", 1000); | |
This file contains 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
for b in `git branch --remote`; do echo $b `git lg origin/develop..$b|wc -l` ; done |
This file contains 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
#!/usr/bin/env bash | |
xrandr --auto --output HDMI1 --above LVDS1 | |
xrandr --output LVDS1 --off | |
WINEDEBUG=-all \ | |
WINEPREFIX=~/.wineprefixes/spore \ | |
/usr/bin/wine <game.exe> |
This file contains 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
""" | |
Selenium webdriver + BrowserMob proxy example | |
First, you have to download browsermob: | |
wget --no-check-certificate https://s3-us-west-1.amazonaws.com/lightbody-bmp/browsermob-proxy-2.0-beta-9-bin.zip | |
unzip inside the directory you are running this | |
pip install selenium browsermob-proxy |
This file contains 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
░░░░░░░░░▄░░░░░░░░░░░░░░▄░░░░ | |
░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌░░░ | |
░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐░░░ | |
░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐░░░ | |
░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐░░░ | |
░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌░░░ | |
░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌░░ | |
░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐░░ | |
░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌░ | |
░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌░ |
This file contains 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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Pair generator</title> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
function make_pairs() { | |
people = $('#people').val().split('\n'); |
This file contains 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/sh | |
SSHVARS="SSH_CLIENT SSH_TTY SSH_AUTH_SOCK SSH_CONNECTION DISPLAY" | |
for x in ${SSHVARS} ; do | |
(eval echo $x=\$$x) | sed 's/=/="/ | |
s/$/"/ | |
s/^/export /' | |
done 1>$HOME/fixssh |
This file contains 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/sh | |
# | |
# This script will download NodeJS, NPM and lessc, and install them into you Python | |
# virtualenv. | |
# | |
# Based on a post by Natim: | |
# http://stackoverflow.com/questions/8986709/how-to-install-lessc-and-nodejs-in-a-python-virtualenv | |
NODEJS="http://nodejs.org/dist/v0.8.3/node-v0.8.3.tar.gz" |
NewerOlder