Skip to content

Instantly share code, notes, and snippets.

View mystix's full-sized avatar

Marc mystix

  • Singapore
View GitHub Profile
@mystix
mystix / Seiko Matsuda - Sweet Memories
Created September 12, 2010 06:14
Seiko Matsuda - Sweet Memories
http://www.youtube.com/watch?v=F8PfEq6zoOI
http://www.youtube.com/watch?v=9hUlKkknD-U
http://www.youtube.com/watch?v=KO3qr3J3Fyo
http://www.youtube.com/watch?v=RcfvqqaVzV8
なつかしい痛みだわ
ずっと前に忘れていた
でもあなたを見たとき
時間だけ後戻りしたの
@mystix
mystix / .aliases
Created September 27, 2010 19:11
OSX dot config files
# ls shortcuts
alias ls='ls -G'
alias ll='ls -Flh'
# git shortcuts
function git_discard {
# note: only works in zsh shell
echo "Discard all changes? "
read -q REPLY
@mystix
mystix / natural-sort.js
Created October 19, 2010 13:15
Javascript sorting algorithms
/*!*
natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript.
Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre)
Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be>
Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion.
Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com>
The Java version was based on the C version by Martin Pool.
Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
#!/bin/bash
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin)
CATALINA_HOME=/Users/username/tomcat
function shutdown() {
date
echo "Shutting down Tomcat"
$CATALINA_HOME/bin/catalina.sh stop
@mystix
mystix / tomcat
Created November 3, 2010 21:31
Tomcat - Linux System V startup file (to be placed in /etc/rc.d/init.d/tomcat)
#!/bin/bash
#
# Tomcat startup file
#
# chkconfig: 2345 99 99
# description: Tomcat startup file
#
# note:
# To install tomcat startup script in Fedora,
# copy this script to /etc/rc.d/init.d,
@mystix
mystix / groovy-daemon
Created December 19, 2010 06:40 — forked from thekindofme/groovy-daemon
run java program as a daemon
#!/bin/bash
#
# Derived from -
# Joshua Davis
# http://shrubbery.mynetgear.net/c/display/W/Java+Daemon+Startup+Script
#
# This is a modification of the original script (which lets you run a java program as a deamon.
# look bellow for more information) that lets you run a groovy script as a deamon.
#
# ============== OLD SCRIPT TEXT ==============
@mystix
mystix / server.sh
Created March 19, 2011 15:37 — forked from mariusv/server.sh
Rackspace Cloud - script for new servers
#!/bin/sh
#
# server.sh
# Author: Marius Voila
# Edited by: marc
# Created: 06/25/2010
# Updated: 19/03/2011
#
# See my blog post on this script: http://mariusv.com/rackspace-cloud-new-server-script
#
@mystix
mystix / passenger-nginx-setup.sh
Created March 21, 2011 14:00
Rackspace Ubuntu -- RVM + PostgreSQL + Passenger + NGiNX setup script
# install rvm
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# install ruby 1.9.2 + some global gems
rvm install 1.9.2
rvm use 1.9.2@global
gem install awesome_print map_by_method wirble bundler builder pg cheat
gem install -v2.1.2 builder
@mystix
mystix / mime.types
Created August 22, 2011 04:40
Start Tomcat 7.x automatically on OSX using JSVC 1.0.8 (must be run behind nginx)
types {
text/html html htm shtml;
text/css css;
text/xml xml;
text/cache-manifest manifest;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
@mystix
mystix / org.eclipse.jetty.plist
Created August 23, 2011 06:23
Jetty 6 & 7 launchd plists for OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><!-- NOTE: place this file in /Library/LaunchDaemons -->
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.eclipse.jetty</string>
<key>ServiceDescription</key>
<string>Jetty 7</string>