Skip to content

Instantly share code, notes, and snippets.

View yageek's full-sized avatar
🥨

Yannick Heinrich yageek

🥨
View GitHub Profile
@yageek
yageek / .zshrc
Created June 4, 2014 20:22
zsh configuration
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="amuse"
@yageek
yageek / gist:c90e8d0e29e813ff5561
Last active October 3, 2015 08:56 — forked from jorgenisaksson/gist:76a8dae54fd3dc4e31c2
Create a CGPath from an NSBezierPath in Swift. Great for CALayers for example.
// Adapted from Cocoa Drawing Guide's "Create a CGPathRef fram an NSBezierPath Object"
func CGPathFromNSBezierPath(nsPath: NSBezierPath) -> CGPath! {
if nsPath.elementCount == 0 {
return nil
}
let path = CGPathCreateMutable()
var didClosePath = false
@yageek
yageek / main.go
Created December 1, 2015 16:24
Cookie Expiring error
package backend
import (
"encoding/json"
"net/http"
"time"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
@yageek
yageek / Example
Created July 5, 2016 08:44
Operations Example
class GetStopsOperation: GroupOperation {
let completion: (inner: () throws -> Void) -> Void
init(context: NSManagedObjectContext, completion: (inner: () throws -> Void) -> Void) {
self.completion = completion
// Line Operations
let getLinesCall = API.GetLinesColors

Keybase proof

I hereby claim:

  • I am yageek on github.
  • I am yageek (https://keybase.io/yageek) on keybase.
  • I have a public key whose fingerprint is 6319 4D4A 44C9 B95C 17C5 7B72 8C79 AD2F BFFA 774C

To claim this, I am signing this object:

@yageek
yageek / JSONSerializationProcedure.swift
Created November 17, 2016 10:52
ProcedureKit compilation error
public final class JSONSerializationProcedure<T: JSONObject>: Procedure, ResultInjection {
public var requirement: PendingValue<URLRequest> = .pending
public var result: PendingValue<HTTPRequirement<Data>> = .pending
private var object: ResourceResult<T>
public init(object: ResourceResult<T>) {
self.object = object
super.init()
@yageek
yageek / output.log
Created March 30, 2017 16:02
Rust target compilation error
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
TARGET = Some("armv7-linux-androideabi")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
CC_armv7-linux-androideabi = None
CC_armv7_linux_androideabi = None
TARGET_CC = None
@yageek
yageek / native-lib.cpp
Created August 16, 2017 13:04
Android VM Settup (Qt inpired)
static JavaVM * m_android_vm = nullptr;
extern "C"
jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
__android_log_print(ANDROID_LOG_DEBUG, "TestBluetooth", "JNI LOAD");
static bool initialised = false;
if (initialised) {
return initialised;
}
@yageek
yageek / orhttp_example.go
Created August 31, 2017 16:37 — forked from Yawning/orhttp_example.go
How to dispatch HTTP requests via Tor in Go.
// To the extent possible under law, the Yawning Angel has waived all copyright
// and related or neighboring rights to orhttp_example, using the creative
// commons "cc0" public domain dedication. See LICENSE or
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
package main
import (
// Things needed by the actual interface.
"golang.org/x/net/proxy"
@yageek
yageek / app.js
Created September 15, 2017 12:48 — forked from Turbo87/app.js
webpack + font-awesome test
require('font-awesome/css/font-awesome.css');
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>';