Skip to content

Instantly share code, notes, and snippets.

View dallarosa's full-sized avatar

Francisco Dalla Rosa Soares dallarosa

View GitHub Profile
@ishworgurung
ishworgurung / kevent_srv.py
Created May 24, 2012 07:15
So, how can I use kqueue/kevent on BSD/Mac using Python?
#!/usr/bin/env python
"""
Example on using Kqueue/Kevent on BSD/Mac
using Python.
The TCP server essentially echoes back the
message it receives on the client socket.
"""
__author__ = "Ishwor Gurung <ishwor@develworx.com>"
@kylelemons
kylelemons / valsort.go
Created September 22, 2011 21:36
Sort a map by its values
package main
import "fmt"
import "sort"
func main() {
m := map[string]int{
"One": 1,
"Two": 2,
"Three": 3,
/**
This code snippet shows how an Android activity can trigger a web based auth using webview and then use
the cookies from there to make subsequent calls to an API (since the api is checking the cookies to detect
sign in)
MyApplication: The root "controller" and the first activity in my app
OAuthLogin: A class that handles the web based login.
It montors the url change and if the user had been redirected to
a "success" page it sends out the cookie string to the root controller
Once the controller has the cookie, it sets those on the service that