var welcome_user = new Template('#{welcome} #{name}!!');
welcome_user.parse({ welcome: "Hello", name: "John" });
//returns "Hello John!!"
welcome_user.parse({ welcome: "Hola", name: "Peter" });
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
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.screenX; | |
touchstartY = event.screenY; |
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
# Create a directory | |
mkdir ~/tmux-install | |
cd ~/tmux-install | |
# Get the files | |
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz | |
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz | |
# Extract them | |
tar xzf tmux-1.5.tar.gz |
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
# coding: utf8 | |
""" Attempt at gevent-compatible requests without any monkeypatching """ | |
import geventhttpclient | |
from geventhttpclient import httplib as gehttplib | |
from geventhttpclient.useragent import CompatResponse | |
import httplib as _httplib | |
import requests |