Skip to content

Instantly share code, notes, and snippets.

View rohshall's full-sized avatar

Salil Wadnerkar rohshall

  • United States
View GitHub Profile
@fujimura
fujimura / api.hs
Last active December 16, 2015 05:59
Hit an web API with http-streams and aeson
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Control.Monad
import Data.Aeson (FromJSON, parseJSON, (.:))
import qualified Data.Aeson as AE
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Lazy as LBS
import Network.Http.Client (Response, concatHandler, get)
import OpenSSL (withOpenSSL)
@lfborjas
lfborjas / graph.java
Created August 1, 2012 04:31
A simple adjacency list implementation in OOP and not-so-OOP
/**I actually needed a typed language to make this clear, but fret not, there's a ruby example below!*/
public class Graph{
static class Vertex{
/** Every vertex is aware of its immediate adjacent neighbors*/
private List<Vertex> adjacent_vertices;
public void add_adjacent(Vertex neighbor){
adjacent_vertices.append(neighbor);
}
}
@hron84
hron84 / netbeans.desktop
Created May 10, 2011 06:10
Netbeans Linux shortcut
[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 7.0
GenericName=NetBeans IDE
Comment=NetBeans IDE
Icon=/opt/netbeans/nb/netbeans.png
Exec=/opt/netbeans/bin/netbeans
Category=Development;IDE;Java;
Type=Application
Terminal=false
/* TinyWM is written by Nick Welch <[email protected]>, 2005.
* TinyWM-XCB is rewritten by Ping-Hsun Chen <[email protected]>, 2010
*
* This software is in the public domain
* and is provided AS IS, with NO WARRANTY. */
#include <xcb/xcb.h>
int main (int argc, char **argv)
{