Skip to content

Instantly share code, notes, and snippets.

@wiura
wiura / get_zosia_rooms.py
Created February 20, 2017 16:03
Pretty print room occupants for ZOSIA conference
import requests
cookie = 'sessionid=PUT_YOUR_SESSIONID_HERE'
rooms_url = 'https://www.zosia.org/rooms/list.json'
room_url = 'https://www.zosia.org/rooms/modify/'
student_to_room_map = {}
def get_rooms():
@wiura
wiura / proguard-rules.pro
Created September 28, 2016 12:48
Guava 19.0 with proguard
-dontwarn javax.annotation.**
-dontwarn javax.inject.**
-dontwarn sun.misc.Unsafe
-keep class com.google.j2objc.annotations.** { *; }
-dontwarn com.google.j2objc.annotations.**
-keep class java.lang.ClassValue { *; }
-dontwarn java.lang.ClassValue
-keep class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement { *; }
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
package com.mgr.utils.couch
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.http.Http
import net.liftweb.json
import com.mgr.utils.logging.Logging
final case class BulkDoc[T <: Document](docs: Seq[T])
@wiura
wiura / gist:1bae09b21be6fc629c09
Created May 5, 2015 11:23
Bootstrap popover button with close link and focus trigger
// html
<a class="event" tabindex="0" role="button"></a>
// js
var options = {
content: '<div>Some text <div class="pull-right closeon">x</div></div>',
placement: 'top',
trigger: 'manual',
@wiura
wiura / gist:ab459ac4d3d1126460f2
Last active August 29, 2015 14:05
Connect to google api from go
package storage
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"code.google.com/p/goauth2/oauth/jwt"
@wiura
wiura / gist:998e7dddbd3da6c50fe7
Created August 7, 2014 11:07
Django model form mixins depending on type of data
"""
Django model form mixins depending on type of data
"""
import json
from django.conf import settings
settings.configure()
from django import forms
@wiura
wiura / gist:6fb338d05fa4b7c61371
Created August 6, 2014 15:09
Mix in fields to django model form.
"""
Mix in fields to django model form.
"""
from django.conf import settings
settings.configure()
from django import forms
from django.db import models