Skip to content

Instantly share code, notes, and snippets.

View cnf's full-sized avatar

Frank Rosquin cnf

View GitHub Profile
@cnf
cnf / gist:2732047
Created May 19, 2012 19:15
Apple UI request regarding resizing of text areas [rdar://11490741]
Summary:
We need a container to hold accessories. For example project panels in code editors. But one that doesn't resize the valuable real estate of a window when activated.
Steps to Reproduce:
Open an editor like chocolatapp or textmate 2 beta, and resize it so the text area is about 700px wide (half the screen real estate on f.e. a 13" MBA) or about 84 columns. Toggle the project drawer (or equivalent). When this was done with a drawer, the area of the window containing the text, your _code_, stayed unaltered. With navigator style panels that area gets resized.
Expected Results:
No action, for whatever reason, should ever resize/move the text area of a text/code editor (or the actualy valuable screen real estate of an app). The actual active part of the app that contains the data you are focusing on (the holy area) should always be in a predictable place for the user.
Actual Results:
@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():
@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 / _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 / 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 / NAS_Parts.md
Last active December 20, 2015 12:39
NAS Parts
@cnf
cnf / toolkit.md
Last active December 23, 2015 01:49
IT toolkit planning
@cnf
cnf / docker.md
Last active January 4, 2016 01:29