Skip to content

Instantly share code, notes, and snippets.

View 0xced's full-sized avatar

Cédric Luthi 0xced

View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@interface UIImage(ImmediateLoad)
+ (UIImage*)imageImmediateLoadWithContentsOfFile:(NSString*)path;
@end
@implementation UIImage(ImmediateLoad)
+ (UIImage*)imageImmediateLoadWithContentsOfFile:(NSString*)path {
UIImage *image = [[UIImage alloc] initWithContentsOfFile:path];
@jmangelo
jmangelo / WorkbookClosedMonitor.cs
Created February 11, 2010 20:00
Helper class to provide a Excel Workbook Closed event.
using System;
using Excel = Microsoft.Office.Interop.Excel;
namespace Helpers.Vsto
{
public sealed class WorkbookClosedMonitor
{
internal class CloseRequestInfo
{
public CloseRequestInfo(string name, int count)
// DySlim is complicated and requires writing 6GB to disk (if only temporarily).
// This lets you mount the dyld shared cache via FUSE; the resulting files are weird but readable by things like otool and strings.
//
// gcc -std=gnu99 -I/opt/local/include -L/opt/local/lib -D_FILE_OFFSET_BITS=64 -o dsc dsc.c -lfuse -framework CoreFoundation
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
@nevyn
nevyn / README.md
Created January 4, 2011 08:37
SPMediaKeyTap is a global event tap for the play/pause, prev and next keys on the keyboard. http://overooped.com/post/2593597587/mediakeys
#!/usr/bin/env python
# Nicolas Seriot
# 2011-01-06
# https://gist.github.com/768457
"""
Input: path of an Objective-C project
Output: import dependancies Graphviz format
@stuartcarnie
stuartcarnie / main.m
Created March 4, 2011 19:59
Demonstrates we can now support limited JIT compilation on recent versions of iOS (assuming Apple approves entitlements at some future point)
//
// main.m
// ProtectTest
// Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation.
//
// Must be compiled with Thumb disabled
//
// Created by Stuart Carnie on 3/4/11.
// Copyright 2011 Manomio LLC. All rights reserved.
//
// Hosey_warnings.xcconfig
// see http://boredzo.org/blog/archives/2009-11-07/warnings
// http://rentzsch.tumblr.com/post/237349423/hoseyifyxcodewarnings-scpt
// http://tewha.net/2010/11/xcode-warnings/
GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
@drewmccormack
drewmccormack / prefixer.py
Created May 10, 2011 07:25
Change the prefix of a Cocoa project
#!/usr/bin/env python
#---------
# Script to change the prefix of a framework
#---------
import os
import re
import string
@AlanQuatermain
AlanQuatermain / gist:977280
Created May 17, 2011 20:13
A fix for a bug in -countForFetchRequest: in iOS versions prior to 4.0. If you have multiple stores at the base of your CoreData stack, it would throw an exception. The fix below swaps out the faulty version with one which directs the request at the corre
@interface NSManagedObjectContext (AQFixedCountForFetchRequestOnIOS32)
@end
@implementation NSManagedObjectContext (AQFixedCountForFetchRequestOnIOS32)
+ (void) load
{
// +load gets called per-category, unlike +initialize
if ( [[[UIDevice currentDevice] systemVersion] compare: @"4.0" options: NSNumericSearch] == NSOrderedAscending )
{