This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2010 Edovia. All rights reserved. | |
# Created by Marc-Etienne M.Léveillé on 02-08-10 | |
function exit_with_message { | |
echo $1 | |
exit 1 | |
} | |
if [ $UID -ne 0 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface A: NSObject | |
@end | |
@implementation A | |
void pileOfPoo(id self, SEL _cmd) { | |
NSLog(@"💩"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@size = (1920, 1080); | |
@center = (-.743653135, .131826563); | |
$zoom = .000014628; | |
$max_it = 700; | |
$oversample = 2; | |
$_ *= $oversample for (@size); | |
open $fh, "|-", "convert -size ".join("x",@size)." -depth 8 gray:- ". | |
"-resize ".(100/$oversample)."% mandel.png"; | |
for $py (1 .. $size[1]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "sqlite3.h" | |
typedef int64_t timestamp; | |
NSUInteger randomNumberInRange(NSUInteger start, NSUInteger end); | |
// Create a sample date using the ISO-8601 format. | |
// 2013-04-23T16:29:05Z | |
NSString* generateSampleDate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[db makeFunctionNamed:@"UTTypeConformsTo" maximumArguments:2 withBlock:^(sqlite3_context *context, int argc, sqlite3_value **argv) { | |
if (sqlite3_value_type(argv[0]) == SQLITE_TEXT) { | |
const unsigned char *a = sqlite3_value_text(argv[0]); | |
const unsigned char *b = sqlite3_value_text(argv[1]); | |
CFStringRef as = CFStringCreateWithCString(0x00, (const char*)a, kCFStringEncodingUTF8); | |
CFStringRef bs = CFStringCreateWithCString(0x00, (const char*)b, kCFStringEncodingUTF8); | |
sqlite3_result_int(context, UTTypeConformsTo(as, bs)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
# Send SMS messages via Infomaniak.ch | |
# You need an Infomaniak.ch account and have some credits to send SMS | |
# Stephan Burlot, http://coriolis.ch Dec, 30 2012 | |
# | |
<?php | |
// Username (your email address) | |
define('USER', 'user@domain.ch'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://en.wikipedia.org/wiki/Category:Coffee_brands | |
$covfefes = [ | |
'alterracoffeeroasters', | |
'angiangcoffee', | |
'angelinus', | |
'autocrat', | |
'barcaffe', | |
'batdorfbronson', | |
'bewleys', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creates a ramdisk and start Xcode with the DerivedData stored in ramdisk. Also deletes the ramdisk and reset Xcode prefs. | |
# xc_ramdisk.sh | |
# - creates a ramdisk, set Xcode DerivedData to this disk and start Xcode. | |
# - umount a ramdisk, set Xcode DerivedData to default | |
# Stephan Burlot, Coriolis Technologies, http://www.coriolis.ch | |
# | |
# based on Alex Shevchenko xcode_ramdisk.sh script (https://gist.github.com/skeeet/2367298) | |
# based on Diego Freniche xc-launch.sh script (https://github.com/dfreniche/xc-launch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
#RewriteBase /blog/ | |
RewriteBase /~accountname/ | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
#RewriteRule . /blog/index.php [L] | |
RewriteRule . /~accountname/index.php [L] |
OlderNewer