Skip to content

Instantly share code, notes, and snippets.

View yageek's full-sized avatar
🥨

Yannick Heinrich yageek

🥨
View GitHub Profile
@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 / 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 / .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 / room.js
Created March 15, 2014 12:24
Undefined rapahel bug
//=require raphael
function inherits(p) {
if (p == null) throw TypeError();
if (Object.create)
return Object.create(p);
var t = typeof p;
if( t !== "object" && t !== "function") throw TypeError();
function f() {};
f.prototype = p;
return new f();
@yageek
yageek / import.rb
Created January 19, 2014 11:50
Blogger to octopress
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@yageek
yageek / build.sh
Created January 17, 2014 13:08
GMP 5.1.3 build for armv7
#!/bin/bash
# Yay shell scripting! This script builds a static version of
# GMP ${GMP_VERSION} for iOS 7.0 that contains code for
# armv6, armv7, arm7vs, arm64.
set -x
# Setup paths to stuff we need
@yageek
yageek / .vimrc
Last active April 30, 2018 06:28
Vim configurations file
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
set background=dark
Plugin 'VundleVim/Vundle.vim'
@yageek
yageek / build.gradle
Last active December 20, 2015 05:38
Android Annotations + Android Studio + Gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android'
@yageek
yageek / ChartElementView
Created July 15, 2013 19:58
View Group question
public class ChartElementView extends ViewGroup {
private final String myTag = "ChartElementView";
private RectF mHorizontalBarBounds = new RectF();
private HorizontalBar mChartBar;
private Parking mParkingData;
@yageek
yageek / PieChart.java
Created July 15, 2013 19:56
Piechart in customview android code
/* Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,