⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)
You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)
If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.
Note that this is not specific to Rails projects. This can work for any standalone front-end project.
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
#Mac OS X
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.
- Install memcached. I'd suggest using homebrew.
brew install memcached
- Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
- Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
- Extract the source into
/Applications/MAMP/bin/php/[php version folder]/include/php
. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
/Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache
.
# | |
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
# just run "sudo trimforce enable" to activate the trim support from now on! | |
# | |
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
# | |
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
# | |
# Alternative to http://www.groths.org/trim-enabler-3-0-released/ |
DROP TABLE IF EXISTS time_dimension; | |
CREATE TABLE time_dimension ( | |
id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
db_date DATE NOT NULL, | |
year INTEGER NOT NULL, | |
month INTEGER NOT NULL, -- 1 to 12 | |
day INTEGER NOT NULL, -- 1 to 31 | |
quarter INTEGER NOT NULL, -- 1 to 4 | |
week INTEGER NOT NULL, -- 1 to 52/53 | |
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
.filter("timeago", function () { | |
//time: the time | |
//local: compared to what time? default: now | |
//raw: wheter you want in a format of "5 minutes ago", or "5 minutes" | |
return function (time, local, raw) { | |
if (!time) return "never"; | |
if (!local) { | |
(local = Date.now()) | |
} |
Fix for installing MediaTek USB(RT2870/RT2770/RT3X7X/RT537X) driver in OS X Mavericks
Absolutely no warranties! Proceed at your own risk!
Download driver from here: http://www.mediatek.com/_en/07_downloads/01_windows.php?sn=502
You will need Pacifist: http://www.charlessoft.com
- Ensure your USB Wireless adapter is disconnected and reboot.
- Mount RTUSB D2870-4.2.6.0 UI-4.0.8.0_2012_09_28-2.dmg