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 | |
# 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/ |
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 | |
if [ `which brew` = '' ]; then | |
echo "You have to install Homebrew first" | |
exit 1 | |
fi | |
echo "Installing required packages for PIL..." | |
brew install libjpeg | |
brew install https://raw.github.com/yuuna/homebrew/freetype/Library/Formula/freetype2.rb |
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 | |
sudo apt-get install libsdl1.2-dev | |
sudo apt-get install libsdl-image1.2-dev | |
sudo apt-get install libsdl-mixer1.2-dev | |
sudo apt-get install libsdl-ttf2.0-0 |
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 | |
PLATFORM=`uname` | |
PYTHON_VERSION=2.7.2 | |
echo "*****************************************************" | |
echo | |
echo " Install and Config pythonbrew" | |
echo | |
echo "*****************************************************" | |
if [ "$PLATFORM" = 'Linux' ]; 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
/* | |
* Dynamic Include Outer JavaScript | |
*/ | |
include = function(url){ | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = url; | |
document.body.appendChild(script); | |
} |
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
namespace 'net.hashnote.module', (exports) -> | |
exports.include = include = (url) -> | |
### | |
Include outer javascript dynamically | |
Args: | |
url - an outer javascript url | |
### | |
script = document.createElement 'script' | |
script.type = 'text/javascript' |
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
window.namespace = (target, name, block) -> | |
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3 | |
top = target | |
target = target[item] or= {} for item in name.split '.' | |
block target, top |
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
namespace 'net.hashnote.path', (exports) -> | |
exports.root = root = (pattern) -> | |
### | |
Get root path of script | |
Args: | |
pattern - a pattern of script name written in <script> src tag | |
Example: | |
alert(net.hashnote.path.root('jquery(\.min)?\.js')); |
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
### | |
Detect browser name, version and OS | |
@ref: http://www.quirksmode.org/js/detect.html | |
### | |
class Detector | |
constructor: -> | |
@browser = @searchString(Detector.dataBrowser) or "An unknown browser" | |
@version = @searchVersion(navigator.userAgent) or @searchVersion(navigator.appVersion) or "An unknown browser" | |
@OS = @searchString(Detector.dataOS) or "An unknown OS" |
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
# | |
# CoffeeScript Project Utils | |
# | |
# Author: Alisue (lambdalisue@hashnote.net - http://hashnote.net) | |
# License: MIT License | |
# | |
# Required: | |
# - node.js | |
# - coffee-script: npm install coffee-script | |
# - docco: npm install docco |