Skip to content

Instantly share code, notes, and snippets.

View dee-kap's full-sized avatar
🎯
Focusing

Dee Kap dee-kap

🎯
Focusing
  • Sydney, Australia
View GitHub Profile
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
# for instructions for custom theme visit https://github.com/greshake/i3status-rust/blob/master/themes.md
idle_bg = "#292d3e"
idle_fg = "#d0d0d0"
info_bg = "#82aaff"
info_fg = "#292d3e"
good_bg = "#c3e88d"
good_fg = "#292d3e"
warning_bg = "#bffcb6"
warning_fg = "#292d3e"
[
{
"id": "6384837593",
"type": "CreateEvent",
"actor": {
"id": 29132295,
"login": "poojithakat",
"display_login": "poojithakat",
"gravatar_id": "",
"url": "https://api.github.com/users/poojithakat",
@dee-kap
dee-kap / CIKgetter.R
Created November 24, 2016 04:50 — forked from ddd1600/CIKgetter.R
get SEC CIK number from ticker symbol
getCIK = function(ticker) {
stopifnot(is.character(ticker))
uri = "http://www.sec.gov/cgi-bin/browse-edgar"
response = getForm(uri,CIK=ticker,action="getcompany")
html = htmlParse(response)
CIKNode = getNodeSet(html, "//acronym[@title=\"Central Index Key\"][text() = \"CIK\"]")
CIKNodeText = sapply(CIKNode, function(x) xmlValue(getSibling(getSibling(x))))
CIK = sub(" .*","",CIKNodeText)
CIK = sub("^0*","",CIK)
Wed, 22 Apr 2015 03:37:57 GMT slc slc.run: argv [ 'ctl' ] options { _: [ 'ctl' ], '$0': 'slc' }
Wed, 22 Apr 2015 03:37:57 GMT slc loadCommand name ctl run? function usage? object
Wed, 22 Apr 2015 03:37:59 GMT strong-mesh-client:meshctl API Url: /Users/deepak/.strong-pm/pmctl
Wed, 22 Apr 2015 03:37:59 GMT strong-mesh-models:client connecting to http://unix:/Users/deepak/.strong-pm/pmctl:/api
Wed, 22 Apr 2015 03:37:59 GMT express:application compile etag weak
Wed, 22 Apr 2015 03:37:59 GMT express:application compile query parser extended
Wed, 22 Apr 2015 03:37:59 GMT express:application compile trust proxy false
Wed, 22 Apr 2015 03:37:59 GMT express:application booting in development mode
Wed, 22 Apr 2015 03:37:59 GMT loopback:datasource Settings: {"url":"http://unix:/Users/deepak/.strong-pm/pmctl:/api","debug":true}
Wed, 22 Apr 2015 03:37:59 GMT loopback:boot:compiler Skipping /usr/local/lib/node_modules/strongloop/node_modules/strong-mesh-models/client/boot - Error: Cannot find module '/usr/local/lib/node_mod
@dee-kap
dee-kap / 0_reuse_code.js
Created January 13, 2014 10:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dee-kap
dee-kap / goodreads-oauth-example.py
Created September 12, 2012 11:20 — forked from gpiancastelli/goodreads-oauth-example.py
A Python example of how to use OAuth on GoodReads
import oauth2 as oauth
import urlparse
url = 'http://www.goodreads.com'
request_token_url = '%s/oauth/request_token/' % url
authorize_url = '%s/oauth/authorize/' % url
access_token_url = '%s/oauth/access_token/' % url
consumer = oauth.Consumer(key='Your-GoodReads-Key',
secret='Your-GoodReads-Secret')
@dee-kap
dee-kap / zenburn.vssettings.xml
Last active March 29, 2016 18:17
Zenburn vssettings file for Visual Studio 2010
<UserSettings>
<ApplicationIdentity version="11.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
<ToolsOptionsCategory name="TextEditor" RegisteredName="TextEditor">
<ToolsOptionsSubCategory name="FSharp" RegisteredName="FSharp" PackageName="Text Management Package">
<PropertyValue name="TabSize">4</PropertyValue>
<PropertyValue name="AutoListMembers">true</PropertyValue>
<PropertyValue name="IndentStyle">1</PropertyValue>
<PropertyValue name="HideAdvancedMembers">true</PropertyValue>
@dee-kap
dee-kap / gnome-terminal-zenburn.sh
Created August 13, 2012 09:24 — forked from planbnet/gnome-terminal-zenburn.sh
Zenburn color scheme for gnome-terminal
#!/usr/bin/env bash
dir=$(dirname $0)
gconfdir=/apps/gnome-terminal/profiles
echo # This makes the prompts easier to follow (as do other random echos below)
########################
### Select a profile ###
########################