Skip to content

Instantly share code, notes, and snippets.

@volnt
volnt / slider.css
Created July 10, 2014 14:23
Slider css style
slider {
display: inline-block;
position: relative;
height: 22px;
width: 100%;
margin: 25px 5px 25px 5px;
vertical-align: middle;
}
slider span {
white-space: nowrap;
import requests
API_KEY="<YOUR-API-KEY>"
BASE_URL="https://api.cloudflare.com/client/v4/"
EMAIL="<YOUR-EMAIL>"
DOMAIN="<YOUR-DOMAIN>"
SUBDOMAIN="<YOUR-SUBDOMAIN>"
def get_ip_address():
r = requests.get("https://api.ipify.org?format=json")

Keybase proof

I hereby claim:

  • I am volnt on github.
  • I am volent (https://keybase.io/volent) on keybase.
  • I have a public key whose fingerprint is F1D5 EDBB 89C8 8684 6061 B72A 7C3B DE27 0862 0B05

To claim this, I am signing this object:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@volnt
volnt / gist:bfba1a431f937866743621fbf346394f
Created September 7, 2016 12:40
Install SFML from source
git clone SFML/sfml
cd sfml
mkdir build
cd build
cmake ..
make
sudo make install
@volnt
volnt / gist:a35dba782d083f456d59c1633d8f6eec
Created September 7, 2016 12:45
Install libfreetype from source with -fPIC
wget http://downloads.sourceforge.net/freetype/freetype-doc-2.6.5.tar.bz2
tar xaf freetype-2.6.5.tar.bz2
cd freetype-2-6-5
mkdir build
cd build
cmake ..
make C_FLAGS="-fPIC -I../include/"
sudo make install
#!/usr/bin/python
import re
import json
import sys
import argparse
from sys import argv
from collections import defaultdict
from google.cloud import storage
from google.cloud import bigquery
@volnt
volnt / Dockerfile
Created December 6, 2016 17:39
Dockerfile for appengine
FROM ubuntu:trusty
RUN apt-get update &&\
apt-get install -y -qq wget rlwrap unzip python-dev python-pip libxml2-dev libxslt-dev zlib1g-dev libjpeg-dev &&\
pip install pycrypto lxml jinja2 webob webapp2 django Pillow
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.zip &&\
unzip google-cloud-sdk.zip &&\
rm google-cloud-sdk.zip
@volnt
volnt / bf.py
Created January 17, 2017 09:34
Brainfuck interpreter
from collections import defaultdict
import sys
PTR = 0
class Memory(defaultdict):
def __init__(self):
super(Memory, self).__init__(lambda: 0)