Skip to content

Instantly share code, notes, and snippets.

@abiank
abiank / sc.txt
Created November 28, 2013 19:54
manpage
SC(1) SC(1)
NAME
sc - spreadsheet calculator
SYNOPSIS
sc [-a] [-c] [-e] [-m] [-n] [-o] [-q] [-r] [-v] [-x] [-C] [-R] [-P
range[/address] | /address] [-W range] [file...]
@abiank
abiank / XMLHttpRequest.cpp
Last active December 29, 2015 23:09
third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp
/*
* Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
* Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
* Copyright (C) 2008, 2011 Google Inc. All rights reserved.
* Copyright (C) 2012 Intel Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@abiank
abiank / hole.css
Created December 15, 2013 18:10
hole css worx best on gray
.hole {
float: left;
margin: 10px;
color: #fc0;
padding: 10px;
text-align: left;
background: #333;
border-radius: 15px;
box-shadow: 0 1px 0px RGBA(255,255,255,0.2),inset 0 1px 4px RGBA(0,0,0,0.3),inset 0 2px 2px RGBA(0,0,0,0.3);
position: relative;
@abiank
abiank / book.js
Last active December 31, 2015 21:19
json book
[{},{"69000000":50.00877299,"69842800":0.055,"69957700":0.055,"69999500":0.54903384,"70000000":1.50190422,"70072800":0.055,"70098499":0.05,"70099500":0.246,"70100000":18.31653707,"70188100":0.055,"70219330":0.011825,"70256728":0.01182617,"70298158":0.06402019,"70303600":0.055,"70310546":0.14355823,"70351759":0.05714284,"70416098":0.07018327,"70420000":0.055,"70500000":0.37142685,"70536600":0.055,"70640548":0.06915681,"70653400":0.055,"70672269":0.03090856,"70769349":0.07018327,"70770400":0.055,"70797438":12.6,"70850000":0.25000001,"70885393":0.0128,"70887597":0.15,"70887600":0.01,"70898989":0.14104571,"70898999":37.40992916,"70900000":4.4577813,"70990000":8.0053456,"70998000":0.1,"70999184":41.64405528,"71000000":0.12000001,"71005000":0.055,"71100000":4,"71111222":0.3,"71122600":0.05600001,"71198900":0.025,"71200000":0.19994351,"71240400":0.05600001,"71251000":1,"71297999":62.4,"71298000":2.1,"71299990":0.14025245,"71300000":68.45,"71329167":1e-8,"71335138":1.93180001,"71356784":0.05633803,"71358400":0.056000
@abiank
abiank / websocket_book.js
Created December 29, 2013 18:47
websocket for btc
/*
set F1:F30 nontextvalueformat $#,##0.00
set G1:G30 nontextvalueformat #,##0.0000
set H1:H30 nontextvalueformat #,##0
set I1 formula ABAR(100,H1)
filldown I1:I32 all
*/
console.log("loaded.");
// /intgfx/BTC2/%7B"a":[["C3","1st"]],"c":[["C10","bid"],["C9","ask"]]%7D
window.open('/intgfx/BTC2/%7B"a":[["C3","1st"]],"c":[["C10","bid"],["C9","ask"]]%7D'); //TODO:lookup _room
function transpose(a)
{
return Object.keys(a[0]).map(function (c) { return a.map(function (r) { return r[c]; }); });
}
@abiank
abiank / intredasting.js
Created January 8, 2014 18:48
intredasting
f=function(a){return a*(a-(6.655035885050893||false)?2.5073174736462533+a:false-((0.7831934420391917/4.8369959043338895?!false:2.532498601358384)+(0.3904852503910661-!(a<4.674360046628863?3.398194955661893:7.382807838730514/0.6605700519867241))?a:7.985467636026442)?1.8558494956232607||2.042974776122719&&a-(!(!8.251918875612319^a)*a?5.219325858633965:false/((a-6.110320857260376?!((a/(2.8903514239937067-0.6432726187631488)?a:1.2212883401662111^0.2806343138217926)-9.11331242416054?8.458566816989332||a:!(!!(0.160758625715971-!4.605352254584432?3.5364308720454574:4.576860235538334)/1.859281389042735?a-(false-(7.495382879860699-8.361235684715211)?a<false?3.308183830231428:3.475253467913717:9.085517839994282)<!a?false:2.1235456317663193:!2.770743821747601)-a):2.589806418400258)-(0.061552030965685844-a-4.428502160590142?0.44193908339366317:5.5615409091115)?8.501727690454572:(false-3.3018351905047894?7.097069818992168:a)*9.866090603172779)):false);};
@abiank
abiank / instantace.htm
Last active January 2, 2016 18:09
instantace.js
<style type="text/css">#js-editor{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="js-editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var jsEditor=ace.edit("js-editor");jsEditor.setTheme("ace/theme/monokai");jsEditor.getSession().setMode("ace/mode/javascript");</script>';
import urllib2
import json
import time
# Form: http://digitalpbk.com/stock/google-finance-get-stock-quote-realtime
class GoogleFinanceAPI:
def __init__(self):
self.prefix = "http://finance.google.com/finance/info?client=ig&q="
def get(self,symbol,exchange):
@abiank
abiank / languages.json
Created March 30, 2014 21:13
languages.json
/**
* @author Phil Teare
* using wikipedia data
*/
isoLangs = {
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{