Skip to content

Instantly share code, notes, and snippets.

View yageek's full-sized avatar
🥨

Yannick Heinrich yageek

🥨
View GitHub Profile
@yageek
yageek / miniCas.cpp
Created September 14, 2018 02:48 — forked from andr1972/miniCas.cpp
Algebraic substitution trees, expand variables to subtree with cloning
#include <memory>
#include <string>
#include <vector>
#include <assert.h>
using namespace std;
enum Type { tEmpty, tNum, tVar, tFrac, tProd, tSum };
enum Precedence { precStart, precSum, precFrac, precAtom };
@yageek
yageek / miostdin.rs
Created July 25, 2018 08:59 — forked from vi/miostdin.rs
Simple copy stdin to stdout example using Rust mio
extern crate mio;
use mio::unix::EventedFd;
use std::fs::File;
use mio::{Token, PollOpt, Ready, Poll, Events};
//use mio_uds::UnixStream;
use std::os::unix::io::{FromRawFd};
use std::io::{Read, Write};
@yageek
yageek / Simplify.swift
Created June 14, 2018 12:40 — forked from lachlanhurst/Simplify.swift
Simplification of a 3D polyline using the Ramer–Douglas–Peucker algorithm in Swift
//
// Simplify.swift
//
// Simplification of a 3D-polyline.
// A port of https://github.com/hgoebl/simplify-java for Swift
//
//
// The MIT License (MIT)
//
// Created by Lachlan Hurst on 10/02/2015.
@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>';
@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 / 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 / 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 / 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()

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 / 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