Skip to content

Instantly share code, notes, and snippets.

Siddharth Kannan icyflame

Block or report user

Report or block icyflame

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@icyflame
icyflame / launch-darkly-pre-requisite-graph-generator.sh
Created May 30, 2019
A bash script to generate a .dot file with the pre-requisite dependency graph of your LaunchDarkly setup
View launch-darkly-pre-requisite-graph-generator.sh
#!/usr/bin/env bash
rm -f flags-output
rm -f dependencies
rm -f flat_json
rm -f output.dot
rm -f tmp
curl -H"Authorization: $LD_API_KEY" https://app.launchdarkly.com/api/v2/flags/default > flags-output
@icyflame
icyflame / institutions-quote.md
Created Aug 14, 2018
Quote about institutions from The Great Influenza (John M Barry)
View institutions-quote.md

Institutions are a strange mix of the mass and the individual. They abstract. They behave according to a set of rules that substitute both for individual judgements and for the emotional responses that occur whenever individuals interact. The act of creating an institution dehumanizes it, creates an arbirtrary barrier between individuals.

Yet institutions are human as well. They reflect the cumulative personalities of those within them, especially their leadership. They tend, unfortunately, to mirror less admirable human traits, developing and protecting self-interest and even ambition. Institutions almost never sacrifice. Since they live by rules, they lack spontaneity. They try to order chaos not in the way an artist or scientist does, through a defining vision that creates structure and discipline but by closing off and isolating themselves from that which does not fit. They become bereaucratic.

The best institutions avoid the worst aspects of bureaucracy in two ways. Some are not really institutions at

@icyflame
icyflame / consistency-saner
Created Feb 19, 2018
List of Links in the MFQP data/data.json at 39a3d69 which don't respond with 200
View consistency-saner
NOT OK: 2010--11 - 503
NOT OK: 2011-12 - 503
NOT OK: %26 - 000
NOT OK: 29 - 503
NOT OK: accounting - 503
NOT OK: Accounting.pdf - 503
NOT OK: AG60124 - 503
NOT OK: Aided - 503
NOT OK: and - 503
NOT OK: AND - 503
View parse_html.go
package main
import (
"fmt"
"golang.org/x/net/html"
"log"
"strings"
)
// return the first tag in subtree for which reqd returns true (DFS)
View t.diff
< {
< "Department": "mechanical engineering",
< "Semester": "mid autumn 2016",
< "Paper": "systems and control",
< "Link": "https://drive.google.com/open?id=0B9VL20IzhCr7ZDRDUlVDNjk4Z0k",
< "Year": "2016"
< },
< {
< "Department": "mechanical engineering",
< "Semester": "end spring 2017",
@icyflame
icyflame / twitter_get_access_tok.go
Created Dec 15, 2017
Get app authentication access token for the Twitter API in Golang
View twitter_get_access_tok.go
package main
import b64 "encoding/base64"
import "encoding/json"
type BearerToken struct {
Token_Type string
Access_Token string
}
@icyflame
icyflame / app-auth.go
Last active Dec 15, 2017
go-twitter library - app authentication doesn't fetch user timelines
View app-auth.go
package main
import (
"fmt"
"github.com/dghubble/go-twitter/twitter"
"golang.org/x/oauth2"
"os"
)
func main() {
View encrypted google osd.xml
<OpenSearchDescription>
<ShortName>Google Encrypted</ShortName>
<Description>search on encrypted.google.com - websites get less data about you</Description>
<Image height="16" width="16" type="image/x-icon">https://www.google.com/favicon.ico</Image>
<Url type="text/html" method="get" template="https://encrypted.google.com/search?q={searchTerms}" />
</OpenSearchDescription>
@icyflame
icyflame / c++-cheatsheet.md
Last active Oct 27, 2017
A cheat sheet for C++
View c++-cheatsheet.md

SORT

include algorithm, vector in C++11

int *arr = NULL;
arr = (int *) malloc(sizeof(int) * len);
std::vector<int> arrv(arr, arr+len);
int temp; cin >> temp;
arrv.push_back(temp); // add an element to the array
std::sort(arrv.begin(), arrv.end()); // MERGE SORT
arrv.clear(); // empty the array
@icyflame
icyflame / links_all1.txt
Created Oct 1, 2017
Criminal podcast - episode-wise mp3 links
View links_all1.txt
You can’t perform that action at this time.