$ rails g model User
belongs_to
has_one
| <?php | |
| /** | |
| * Plist Parser Class | |
| * | |
| * Usage: | |
| * ====== | |
| * $plist = Plist::from_file("~/Music/iTunes/iTunes Music Library.xml"); | |
| * print_r($plist->as_array()); | |
| */ |
| <?php | |
| // file: ./Shape/Circle.php | |
| namespace Shape; | |
| class Circle extends Shape implements ShapeInterface { | |
| public function __construct() { | |
| var_dump($this); | |
| } |
| # http://blog.lavoie.sl/2012/10/git-tutorial-and-global-configs.html | |
| [user] | |
| name = Sébastien Lavoie | |
| email = github@lavoie.sl | |
| [color] | |
| diff = auto | |
| status = auto | |
| branch = auto |
| Copyright (C) 2012 Yoshimasa Niwa | |
| 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: |
| <?php | |
| /** | |
| * On each PHP request (cli, cgi or apache module), | |
| * this script will detect to which project the file belongs and log it. | |
| * It also features a threshold so a couple consecutive minutes without a request | |
| * doesn't stop your timer, see below. | |
| * | |
| * To install, configure the roots (see below) add this line to your php.ini: | |
| * auto_prepend_file=/path/to/file/time-spender-logger.php | |
| * |
| #!/bin/bash | |
| # | |
| # Tracebacks in bash | |
| # https://docwhat.org/tracebacks-in-bash/ | |
| # | |
| # Just take the code between the "cut here" lines | |
| # and put it in your own program. | |
| # | |
| # Written by Christian Höltje | |
| # Donated to the public domain in 2013 |
| #!/bin/bash | |
| # Mac OS launchctl utility | |
| # Support partial match | |
| # Will exit on error if no of more than one service is found. | |
| # | |
| # @link http://blog.lavoie.sl/2013/08/service-management-utility-for-mac-osx.html | |
| # @link https://gist.github.com/lavoiesl/6160897 | |
| # | |
| # Usage: | |
| # service selfupdate |
| #!/usr/bin/env bash | |
| # Sysbench wrapper for several tests of sysbench | |
| # Scales with number of processors, works on mac and linux | |
| # | |
| # @link https://gist.github.com/lavoiesl/7536567 | |
| # | |
| # wget https://gist.github.com/lavoiesl/7536567/raw/sysbench.sh -O - 2>/dev/null | bash | |
| # | |
| # Requires http://sysbench.sourceforge.net/ |