Skip to content

Instantly share code, notes, and snippets.

View cnf's full-sized avatar

Frank Rosquin cnf

View GitHub Profile
@cnf
cnf / golang.md
Last active October 1, 2015 09:04
Golang notes and tricks
@cnf
cnf / docker.md
Last active January 4, 2016 01:29
@cnf
cnf / toolkit.md
Last active December 23, 2015 01:49
IT toolkit planning
@cnf
cnf / NAS_Parts.md
Last active December 20, 2015 12:39
NAS Parts
@cnf
cnf / logstash_per_index.json
Created December 18, 2012 13:05
ElasticSearch template for LogStash usage
{
"template" : "logstash*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index.cache.field.type" : "soft",
"index.cache.field.max_size": 50000,
"index.cache.field.expire": "10m",
"index.refresh_interval" : "5s",
"index.store.compress.stored" : true,
@cnf
cnf / _game_pc_parts_2017.md
Last active May 30, 2017 10:57
Gaming PC Parts

Game PC Parts 2017

Prices are approximations

Part Specifics Price
CPU [7700k][cpu] € -
Fan [Cryorig H7][fan] € -
RAM [Corsair 16G][ram] € -
GPU Inno3D [1080Ti][gpu] € -
@cnf
cnf / screenshotter.py
Created July 19, 2012 18:59
Make screenshots of areas in selenium
#!/usr/bin/env python
from PIL import Image
import StringIO
def screenshot(browser, element, filename='screenshot.png'):
"""docstring for screenshot"""
elem = browser.find_element_by_css_selector(element)
loc = elem.location
size = elem.size
screenshot = browser.get_screenshot_as_base64()
@cnf
cnf / gist:2793683
Created May 26, 2012 12:01
API signing
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import httplib2
import json
API_URL = 'http://127.0.0.1:5000/api/rest'
DEVICE_ID = '36263EED-7ACA-45AB-9537-DE86D88773ED'
API_TOKEN = 'JmGQAOAAWkpBTvoFxHQM12tfTKfSJhH3YgwE1uHOfTpZHfhkpl3iovExjfBAeSP'
def get_token():