Skip to content

Instantly share code, notes, and snippets.

View proppy's full-sized avatar

Johan Euphrosine proppy

View GitHub Profile
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
diff --git a/rpc.go b/rpc.go
new file mode 100644
index 0000000..4952448
--- /dev/null
+++ b/rpc.go
@@ -0,0 +1,144 @@
+package docker
+
+import (
+ _ "net/rpc"
@proppy
proppy / Dockerfile
Created November 20, 2013 20:35
proppy/debian-dev Dockerfile
FROM tianon/debian:sid
RUN echo 'deb-src http://http.debian.net/debian sid main' >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install --force-yes -y devscripts
@proppy
proppy / Dockerfile
Last active January 2, 2016 18:39
Dockerfile for minimal flask app
FROM ubuntu
RUN echo 'deb http://archive.ubuntu.com/ubuntu precise universe' | tee -a /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y python python-virtualenv
RUN mkdir -p /usr/src/app
ADD requirements.txt /usr/src/app/
RUN virtualenv /usr/src/app/env
RUN /usr/src/app/env/bin/pip install -r /usr/src/app/requirements.txt
ADD . /usr/src/app
EXPOSE 5000
>>> from gcloud import datastore
>>> dataset = datastore.dataset('foo')
>>> entity = dataset.entity('Foo', 1) # complete key
>>> entity.key
('Foo', 1L)
>>> entity.save() # or dataset.upsert(entity)
>>> entity = dataset.entity('Foo') # incomplete key
>>> entity.key
('Foo',)
>>> entity.save() # or dataset.upsert(entity)
@proppy
proppy / ifreq.go
Last active August 29, 2015 13:56
go tool cgo -godefs=true netdevice.go
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs=true netdevice.go
package foo
type IfReq struct {
Ifrn [16]byte
Ifru [24]byte
}
@proppy
proppy / request_hack.py
Last active August 29, 2015 13:56
request hack to add url prefix
import requests
import json
class Client(object):
def __init__(self, base_url):
self.base_url = base_url
def build_url(self, path):
return self.base_url + path
echo "FROM debian\nRUN apt-get update" | perl -w -MArchive::Tar -e 'my $tar = Archive::Tar->new; $tar->add_data("Dockerfile", <>); print $tar->write' | curl --data-binary @- --header 'Content-Type: application/x-tar' --dump-header - --no-buffer 'http://localhost:4243/build?rm=1&nocache=1'