Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
| //Customise Backbone.sync to work with Titanium rather than jQuery | |
| Backbone.sync = (function() { | |
| var methodMap = { | |
| 'create': 'POST', | |
| 'read' : 'GET', | |
| 'update': 'PUT', | |
| 'delete': 'DELETE' | |
| }; | |
| var xhr = Ti.Network.createHTTPClient({ timeout: 5000 }); |
| #!/bin/sh | |
| # Ref: http://ubuntuforums.org/showthread.php?t=1751455 | |
| # Install required libs | |
| yes | apt-get install build-essential python-dev libjpeg62-dev zlib1g-dev libfreetype6-dev liblcms1-dev | |
| # Link to correct location | |
| if [ -d /usr/lib/x86_64-linux-gnu ]; then | |
| # Ubuntu 11.04 64bit | |
| ln -sf /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/ | |
| ln -sf /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/ | |
| ln -sf /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/ |
| #include "Canvas.h" | |
| Canvas * Canvas::p_Instance = NULL; | |
| Canvas * Canvas::Instance(){ | |
| if(!p_Instance) p_Instance = new Canvas(); | |
| return p_Instance; | |
| } | |
| Canvas::Canvas(){ |
| # Python port of Paul Bourke's http://local.wasp.uwa.edu.au/~pbourke/fractals/lyapunov/gen.c | |
| # By Johan Bichel Lindegaard - http://johan.cc | |
| import math | |
| import random | |
| from PIL import Image, ImageDraw | |
| import argparse | |
| import os | |
| parser = argparse.ArgumentParser(description='Search for chaos.') |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| // ... | |
| SoftwareSerial wifiSerial(8,9); | |
| WiFly wifly; | |
| // ... | |
| void setupWifi() { | |
| wifiSerial.begin(9600); |
Add this to Info.plist in /System/Library/Spotlight/RichText.mdimporter/Contents/ and Spotlight will search for source code files.
<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source
| launchctl unload /System/Library/LaunchAgents/com.apple.notificationcenterui.plist | |
| sudo mv /System/Library/LaunchAgents/com.apple.notificationcenterui.plist /System/Library/LaunchAgents/com.apple.notificationcenterui.bak |
| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |