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(){ | |
/* | |
Use this only if really really necessary. | |
This plugin tries to detect android stock browser. | |
Place it in the head tag. And after Modernizr. | |
https://developer.chrome.com/multidevice/user-agent#webview_user_agent | |
*/ |
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
//place script in head and after modernizr. | |
(function(){ | |
var html = document.getElementsByTagName('HTML')[0]; | |
if("ActiveXObject" in window){ | |
html.className += ' is-IE'; | |
} | |
})() |
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
<html> | |
<head> | |
<title></title> | |
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script> | |
<style> | |
.edit{width: 100px;margin-left:20px;} | |
input | |
{ |
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
/* checkbox multiline label align correction */ | |
label { | |
position:relative; | |
padding-left:22px; | |
display:block; | |
} | |
label input[type=checkbox] { | |
position:absolute; | |
top:2px; |
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
// create an two dimension array | |
function Create2DArray(rows) { | |
var arr = []; | |
for (var i=0;i<rows;i++) { | |
arr[i] = []; | |
} | |
return arr; | |
} |
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
<?php | |
public function post_some_crap() | |
{ | |
$result = Input::get(); | |
/* ============= just a smal data maper snippit ================= */ | |
// replace the table name in ::query('show columns from <tablename> '); | |
// got all rows as index from table |
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
for i in `seq 1 26`; do wget "http://identi.ca/api/statuses/user_timeline.xml?screen_name=peponi&count=200&page=${i}" -O stream-${i}.xml ; sleep 2; done ; |
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
<?php | |
function GetTimeDiff($timestamp) | |
{ | |
$how_log_ago = ''; | |
$seconds = time() - $timestamp; | |
$minutes = (int)($seconds / 60); | |
$hours = (int)($minutes / 60); | |
$days = (int)($hours / 24); | |
if ($days >= 1) { | |
$how_log_ago = $days . ' day' . ($days != 1 ? 's' : ''); |
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
curl http://www-cs-students.stanford.edu/~blynn/gitmagic/intl/de/ch0[1-9].html -o "ch0#1.html" |
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
# find the reference here -> http://www.highcharts.com/ref | |
# github.com/michelson/lazy_high_charts | |
require "lazy_high_charts" | |
class CreateGraph | |
def init() | |
mess = [] |