Skip to content

Instantly share code, notes, and snippets.

View jamesproud's full-sized avatar

James Proud jamesproud

View GitHub Profile
@jamesproud
jamesproud / Dockerfile
Created May 27, 2019 01:12
Rust Dockerfile
# Cargo Build Stage
#FROM rust:1.35 as build
FROM rust@sha256:9fcf1c9d04e10f1c882041da280e3466a5d6f57b27f4cfd8b1ff06f34419ed36 as build
RUN apt-get update
RUN apt-get install musl-tools -y
RUN rustup target add x86_64-unknown-linux-musl

Keybase proof

I hereby claim:

  • I am jamesproud on github.
  • I am jamesproud (https://keybase.io/jamesproud) on keybase.
  • I have a public key ASCyBSZUeWebHmjvvkZh0CdFLWKm7y8ZbUNqoRXvkPb4Hwo

To claim this, I am signing this object:

@jamesproud
jamesproud / gist:5745246
Created June 9, 2013 21:12
Setting The Default Encoding In Python
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
{
"auto_complete_commit_on_tab": true,
"auto_complete_delay": 300,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
@jamesproud
jamesproud / RequestSigner.py
Created June 10, 2012 07:52 — forked from shreyansb/RequestSigner.py
Sign and verify requests
import hmac
import base64
import hashlib
# simplejson is available at: http://pypi.python.org/pypi/simplejson/
import simplejson as json
class RequestSigner(object):
def verify_and_load_signed_request(self, signed_request, secret):
"""Verify the signature, and return decoded data from a signed_request value"""
try: