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 perl | |
use POSIX 'strftime'; | |
while(<>){ | |
print strftime('%Y/%m/%d %H:%M:%S',localtime) , $_ ; | |
} | |
#usage | |
#vmstat -5 | perl vmstat_date.pl |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>$title</title> | |
$styles | |
</head> | |
<body> | |
<h1>$title</h1> |
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
df -k --portability | sed -e "s/\s\{1,\}/,/g" | awk 'BEGIN{FS=",";json = "[{"}{if (NR == 1) { for (i=1;i < NF+1;i++) { key[i] = $i}};if(NR != 1){for (i=1;i < NF;i++) { json = json "\"" key[i] "\":\"" $i "\","}; json = json "\"" key[NF] "\":\"" $NF "\"},{" }} END{ sub(/,\{$/, "", json);json = json "]";print json}' >> df.json |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div id="coderwallbadges" class="badge" data-source="georgeosddev"></div> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script> |
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
(($) -> | |
$.fn.switchClass = (from, to="") -> | |
$(@).removeClass(from).addClass(to) | |
$(@) | |
) jQuery |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+t"], "command": "side_bar_new_file2" } | |
,{ "keys": ["f2"], "command": "side_bar_rename" } | |
,{ "keys": ["ctrl+alt+f"], "command": "side_bar_find_files_path_containing" } | |
] |
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(global){ | |
"use strict"; | |
var _App,version,name; | |
_App = (function(){ | |
function _App(){ | |
version = "0.0.1"; | |
name = "SAMPLE"; | |
} | |
_App.prototype.getVersion = function(){ | |
return version; |
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
cache = [] | |
fib = (i) -> | |
_fib = (i) -> | |
if i is 0 or i is 1 then return i | |
if cache[i]? | |
return cache[i] | |
else | |
cache[i] = _fib(i-1) + _fib(i-2) | |
_fib(i) |
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 charset="utf-8"> | |
<meta name=description content="JSONP SAMPLE"> | |
<meta name=viewport content="width=device-width, initial-scale=1"> | |
<title>JSONP</title> | |
</head> | |
<body> | |
<h2>JSONP Sample</h2> | |
<script src="./jsonp_client.js" type="text/javascript" charset="utf-8"></script> |
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 calc; | |
calc = function(numStr){ | |
var left,right,sumLeft,sumRight; | |
if (typeof numStr !== "string" || isNaN(Number(numStr))){ | |
throw new TypeError("unexpected argument"); | |
} | |
if (numStr.length%2 !== 0){ | |
throw new Error("argument must be 2*N digits"); | |
} | |
left = numStr.substr(0,numStr.length/2); |
OlderNewer