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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
all: json2bson | |
clean: | |
rm -f json2bson | |
json2bson: json2bson.c | |
${CC} $(shell pkg-config --cflags json libmongo-client glib-2.0) -Wall -O0 -ggdb3 -std=c99 ${CFLAGS} \ | |
$(shell pkg-config --libs json libmongo-client glib-2.0) -o $@ $^ | |
check: all | |
./json2bson <test.json >test.bson |
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
# First install tmux | |
# Homebrew | |
brew install tmux | |
# MacPorts | |
sudo port install tmux | |
sudo port install tmux-pasteboard | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) |
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
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier | |
# you can schedule this with launchd to run e.g. weekly | |
# Specify in seconds how long the script should record (default here is 1 hour). | |
seconds=3600 | |
# Date format for the recording file name | |
DATE=`date "+%d-%m-%y_%H-%M"` | |
# start ffmpeg recording |
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
// Photoshop Script to Create iPhone Icons from iTunesArtwork // // WARNING!!! In the rare case that there are name collisions, this script will // overwrite (delete perminently) files in the same folder in which the selected // iTunesArtwork file is located. Therefore, to be safe, before running the // script, it's best to make sure the selected iTuensArtwork file is the only // file in its containing folder. // // Copyright (c) 2010 Matt Di Pasquale // Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and |
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
// | |
// UIColor+.h | |
// iTest | |
// | |
// Created by iwill on 11-03-09. | |
// Copyright 2011 iwill. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
/** | |
Original Code From, Md. Mahmud Ahsan, http://thinkdiff.net/mixed/base-conversion-handle-upto-36-bases/, 2008.02.28 | |
Adapted Objective-C, Furkan Mustafa, 2013.05.28 | |
Description: Alpha Numeric Base Conversion, Handles upto base 36 | |
*/ | |
NSString* reverseString(NSString* original) { | |
const char* chars = [original cStringUsingEncoding:NSASCIIStringEncoding]; | |
int length = strlen(chars); | |
char* new = (char*)malloc(length+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
NSDate *timenow=[NSDate date]; | |
NSLog(@"Date before date2dot net=%@",[timenow description]); | |
NSString *date2DotNet=[timenow dateToDotNet]; | |
NSLog(@"Dot net version of now = %@",date2DotNet); | |
timenow=[NSDate dateFromDotNet:date2DotNet]; | |
NSLog(@"Date back from date2dot net=%@",[timenow description]); |
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 | |
/* Getting a JSON Facebook Feed | |
========================================================================== | |
1. Sign in as a developer at https://developers.facebook.com/ | |
2. Click "Create New App" at https://developers.facebook.com/apps | |
3. Under Apps Settings, find the App ID and App Secret |
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 | |
# Script to export Safari's reading list into a text file, then import this into Pocket or Evernote (or any service with a "email in content" feature). | |
# First take all of Safari's Reading List items and place them in a text file. | |
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' > readinglistlinksfromsafari.txt | |
# Now loop over each of those URls within that text file and add them to pocket. | |
while IFS= read -r line | |
do | |
echo $line |
OlderNewer