This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: python | |
python: | |
- "2.7" | |
sudo: required | |
services: | |
- docker | |
install: | |
- $TRAVIS_BUILD_DIR/build-containers.py | |
script: | |
- docker run --rm my-app test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(plugin)] | |
#![plugin(dynamic_gen)] | |
extern crate dynamic; | |
use dynamic::Object; | |
#[protocol] | |
trait Pet { | |
fn speak(&self) -> String; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an attempt to figure out a way to compose and use enums | |
// from different modules interchangebly. Main use-case would be | |
// when enums are used for messaging. | |
mod event { | |
pub trait AnEvent<T> { | |
fn make(T) -> Self; | |
fn get(self) -> Option<T>; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"golang.org/x/oauth2" | |
) | |
func main() { | |
code := "code" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +roosmaa is my openname (Bitcoin username). https://onename.com/roosmaa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am roosmaa on github. | |
* I am mart (https://keybase.io/mart) on keybase. | |
* I have a public key whose fingerprint is 25E3 6A82 74D1 E1C6 656E 2A3D F762 474B 1635 4473 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... (line: 410) | |
static IntPtr id_setPermissions_Ljava_util_List_; | |
[Register ("setPermissions", "(Ljava/util/List;)Lcom/facebook/Session$AuthorizationRequest;", "")] | |
public global::Facebook.Session.AuthorizationRequest SetPermissions (global::System.Collections.IList p0) | |
{ | |
if (id_setPermissions_Ljava_util_List_ == IntPtr.Zero) | |
id_setPermissions_Ljava_util_List_ = JNIEnv.GetMethodID (class_ref, "setPermissions", "(Ljava/util/List;)Lcom/facebook/Session$AuthorizationRequest;"); | |
IntPtr native_p0 = global::Android.Runtime.JavaList.ToLocalJniHandle (p0); | |
global::Facebook.Session.AuthorizationRequest __ret = global::Java.Lang.Object.GetObject<global::Facebook.Session.AuthorizationRequest> (JNIEnv.CallObjectMethod (Handle, id_setPermissions_Ljava_util_List_, new JValue (native_p0)), JniHandleOwnership.TransferLocalRef); | |
JNIEnv.DeleteLocalRef (native_p0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.roosmaa.example; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
public class Sample | |
{ | |
private Context mContext; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import urllib | |
import urllib2 | |
import json | |
log = logging.getLogger(__name__) | |
def authenticate(refresh_token, client_id, client_secret): | |
"""Authenticates with the Google servers to get authentication token | |
for C2DM API calls. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import time | |
import OpenSSL | |
from django.utils import simplejson | |
def _json_dumps(obj): | |
return simplejson.dumps(obj, separators=(',', ':')) | |
def _base64url(data): |
NewerOlder