This file contains hidden or 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
| ## ----------------------------------------- | |
| ## OS | |
| ## ----------------------------------------- | |
| # ----------------------------------------- | |
| # OSX | |
| # ----------------------------------------- | |
| .DS_Store | |
| .AppleDouble |
This file contains hidden or 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
| /** | |
| * jQuery alterClass plugin | |
| * | |
| * Remove element classes with wildcard matching. Optionally add classes: | |
| * $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' ) | |
| * | |
| * Copyright (c) 2011 Pete Boere (the-echoplex.net) | |
| * Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php | |
| * | |
| */ |
This file contains hidden or 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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
This file contains hidden or 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
| /** | |
| * Console.log with call location and grouping to reduce log noise. | |
| * Apply directly to code once. | |
| * | |
| * Original: http://remysharp.com/2014/05/23/where-is-that-console-log/ | |
| */ | |
| var groupable = typeof console.groupCollapsed !== 'undefined'; | |
| ['log', 'warn'].forEach(function(method) { | |
| var old = console[method]; | |
| console[method] = function() { |
This file contains hidden or 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
| /** | |
| * Prepare the App Folder | |
| */ | |
| (function(){ | |
| window.appRootDirName = ".myapp"; | |
| document.addEventListener("deviceready", onDeviceReady, false); | |
| function onDeviceReady() { | |
| console.log("device is ready"); | |
| window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; |
This file contains hidden or 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
| angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
| .run(function(DB) { | |
| DB.init(); | |
| }); |
This file contains hidden or 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
| 1) Open the Terminal. | |
| 2) Type in "defaults write com.apple.dashboard mcx-disabled -boolean YES". | |
| 3) Press the return (enter) key. | |
| 4) Type "killall Dock". | |
| 5) Press the return (enter) key. |
This file contains hidden or 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 | |
| /** | |
| * Transforms an under_scored_string to a camelCasedOne | |
| */ | |
| function camelize($scored) { | |
| return lcfirst( | |
| implode( | |
| '', | |
| array_map( |
This file contains hidden or 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
| /* -------------------------------------------------------------- | |
| DB MODEL | |
| ID Type_id Name Value Date | |
| -- -------- ------ ------- --------------------- | |
| 1 56 "name1" "lorem" "2011-03-19 22:08:13" | |
| 5 58 "name2" "ipsum" "2011-03-19 22:00:44" | |
| 22 58 "name2" "dolor" "2011-03-20 11:03:13" | |
| 31 25 "name3" "sit" "2011-04-28 18:42:07" | |
| 44 12 "name4" "amet" "2011-04-12 11:06:11" |
This file contains hidden or 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 | |
| /** | |
| * @title: Simple collection classe in PHP | |
| * @link : http://www.sitepoint.com/collection-classes-in-php/ | |
| */ | |
| class Collection | |
| { | |
| private $items = array(); |