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 typewriter(el,text,pos,no){ | |
ctext=text.substring(0,pos)+(pos%2?'_':'<blink>_</blink>'); | |
$(el).html(ctext); | |
if(pos==text.length){ | |
$(el).html(text+"<blink>_</blink>"); | |
} | |
else | |
window.setTimeout('typwriter("'+el+'","'+text+'",'+(pos+1)+','+1+');',800); | |
} |
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
window.onload = function(){ | |
var xhr; | |
if(typeof XMLHttpRequest !== 'undefined') xhr = new XMLHttpRequest(); | |
else { | |
var versions =["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"]; | |
for(var i = 0, len = versions.length; i < len; i++) { | |
try { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Displaying JSON values with JavaScript : Basics of JSON Templating with JavaScript</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> | |
article, aside, figure, footer, header, hgroup, |
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
<!doctype html> | |
<head> | |
<style> | |
body{ | |
background:black; | |
} | |
#header{ | |
width:700px; | |
height:300px; |
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
"{{{ Start and stop ssh tunnel, Fast remote editing idea via http://www.erikzaadi.com/2013/03/07/fast-remote-editing-with-vim/ | |
function! StartSshTunnel(machine) | |
let shellcmd = "ssh ".a:machine." -f -N -o ControlMaster=auto -o ControlPath=/tmp/%r@%h:%p" | |
let tunnel=system(shellcmd) | |
endfunction | |
function! StopSshTunnel() | |
let kill = system("lsof -i -n | grep ssh | awk '{print $2}' | xargs kill -9") | |
endfunction |
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
# Simple test for gist.io | |
This is second line | |
------------------- | |
I dont have much to write just now. | |
` try | |
code | |
sd ` |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<books> | |
<course number="1"> | |
<name>First course</name> | |
<page>1</page> | |
</course> | |
<course number="2"> | |
<name>Getting started</name> | |
<page>2</page> | |
</course> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
<script type="text/javascript" src="https://raw.githubusercontent.com/abdmob/x2js/master/xml2json.min.js" charset="UTF-8"></script> | |
<meta charset="utf-8"> | |
<title>Parsing XML in ajgularJS</title> | |
</head> | |
<body ng-app="todosApp"> | |
<h2>Parsing XML data with AngularJS</h2> |
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
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream, | |
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback | |
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance | |
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
var reqUrl = url.parse(req.url, true) | |
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined; | |
if (cameraName) { | |
try { | |
cameraName = decodeURIComponent(cameraName); |
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
<h1>Alert</h1> | |
<p>Bootstrap JS</p> | |
<div class="alert fade in"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. | |
</div> | |
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p> | |
<div class="alert fade" ng-class="{in:alert}"> | |
<button type="button" class="close" ng-click="alert=false">×</button> |
OlderNewer