Skip to content

Instantly share code, notes, and snippets.

View icyflame's full-sized avatar
💭
🌔

Siddharth Kannan icyflame

💭
🌔
View GitHub Profile
@icyflame
icyflame / ICSForGyft.md
Created March 13, 2017 13:40
Please build ICS exporting into Gyft when you are building the web version!

@athityakumar @ghostwriternr, @zorroblue, @defcon

Congrats guys! I am glad you are working on this. I barely skimmed through the doc, it looks good, will hopefully read it in detail soon.

I have one thing that I would like to talk about. I had a problem which might have been solved if I had used GYFT, but I have never used because GYFT is just too much of a hassle.

  1. I don't want to give access to my Google calendar to a script which would add events to. It will be havoc if something goes wrong, call me paranoid

  2. On the other hand, an ICS is one of the most common ways to export calendars (even F1 does it for their races)

<!DOCTYPE html>
<html>
<head>
	<meta content="music.song" property="og:type">
	<meta content="https://soundcloud.com/neha-banerjee-673916353/tum-ho" property="og:url">
	<meta content="Tum Ho" property="og:title">
	<meta content="https://i1.sndcdn.com/artworks-000209025205-5ejnen-t500x500.jpg" property="og:image">
	<meta content="500" property="og:image:width">
	
B=100;
u=20;
n=10^4;
nu=1.44;
dx=B/n;
p=zeros(1,n+1);
x=zeros(1,n+1);
h=zeros(1,n+1);
h1=0.05;
a=(0.05-0.03)/100;
@icyflame
icyflame / vimrc
Last active January 29, 2017 05:28
the vimrc to roll with when you are thrust onto a new machine with vanilla vim
set mouse=a
set expandtab
set shiftwidth=2
set softtabstop=2
set tw=80
syntax on
filetype plugin on
@icyflame
icyflame / http proxy list of files.md
Last active January 13, 2018 17:20
Because clearing the http proxy settings is more of a pain than finding the right settings to use in the first place
Location Variable names Command to check if this variable still exists
~/dotfiles/.local/kgp.zsh HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy `export
~/.gitconfig Git variables for http and https proxies git config --list
~/.bowerrc proxy and https-proxy used by Gulp No command, check the file itself. remove or change variable name in the file
~/.npmrc http-proxy and https-proxy used by NPM No command, check the file and remove or change
/etc/systemd/system/docker.service.d/http-proxy.conf Environment used by Docker to pull images systemctl show --property=Environment docker => Output should be Environment= (if it shows proxy, then this file needs to be changed) Tutorial
#include <stdio.h>
#include <stdlib.h>
typedef struct node {
int element;
struct node * prev;
struct node * next;
} node;
node * HEAD, * TAIL;
<!DOCTYPE html>
<html>
<head>
<title>The Classical NewsVendor Problem</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="w3_1.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
Operation Code
New List List<Integer> x = new ArrayList<Integer>();
Copy List List<Integer> x = new ArrayList<Integer>(y);
Add an element to the List x.add(element)
Get an elemenet from the List x.get(index)
Clear the list x.clear()
New HashMap HashMap<Integer, String> x = new HashMap<Integer, String>();
Add element to the map x.put(key, value)
Get an element from the map x.get(key)
@icyflame
icyflame / disk-usage.md
Created October 8, 2016 07:58
Disk Usage of the Metakgp wiki server
root@metakgp-wiki:/# du -h --max-depth=1
3.2G	./usr
4.0K	./mnt
8.0K	./media
7.9M	./etc
2.2G	./srv
16K	./lost+found
4.0K	./dev
14G	./home
function findZip(dir, callback) {
var fs = require('fs');
var fileList = fs.readdirSync(dir);
var candidates = [];
for(i in fileList) {
if (fileList[i].match(/.zip$/)) {
candidates.push(fileList[i]);
}
}
if (candidates.length == 1) {