Skip to content

Instantly share code, notes, and snippets.

View yageek's full-sized avatar
🥨

Yannick Heinrich yageek

🥨
View GitHub Profile
@yageek
yageek / gist:4518092
Last active December 11, 2015 00:39
Edit JPEG Tag of a JPEG file using Core foundation
CGImageSourceRef originalImageSource = CGImageSourceCreateWithURL((CFURLRef)imageURL, NULL);
//get gps metadata
NSDictionary *metadata = (NSDictionary *)CGImageSourceCopyPropertiesAtIndex(originalImageSource,0,NULL);
//make the metadata dictionary mutable so we can add properties to it
NSMutableDictionary *metadataAsMutable = [[metadata mutableCopy]autorelease];
[metadata release];
//get mutable gps data
NSMutableDictionary *GPSDictionary = [[[metadataAsMutable objectForKey:(NSString *)kCGImagePropertyGPSDictionary]mutableCopy]autorelease];
if(!GPSDictionary)
{
@yageek
yageek / gist:4571481
Created January 19, 2013 08:46
Ignore temporary files in Eagle
.gitignore
# This line ignore files named .s#1 .s#2 ...
*.s\#[0-9]
{
"repo_token": "SsMwWVXBSQ3OA1ryIc1uAsIqtcVqXZ2rO",
"service_name": "travis-ci",
"sources_files": [
{
"name": "main.m",
"source": "//\n// main.m\n// Peeler\n//\n// Created by HEINRICH Yannick on 24/05/13.\n// Copyright (c) 2013 YaGeek's Company. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\nint main(int argc, char *argv[])\n{\n return NSApplicationMain(argc, (const char **)argv);\n}\n",
"coverage": [
null,
null,
@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,
@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 / 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 / .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.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 / 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 / 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();