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
{ | |
"name": "Key Socket Media Keys", | |
"permissions": [ "tabs" ], | |
"update_url": "http://clients2.google.com/service/update2/crx", | |
"version": "0.2", | |
"icons": { "16": "icon16.png", | |
"48": "icon48.png", | |
"128": "icon128.png" }, | |
"description": "Control your favorite web-based music player with your keyboard's media keys", | |
"permissions": ["tabs"], |
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
// goes with Boris Smus's keysocket extension <https://github.com/borismus/keysocket/> | |
var PREV = 20; | |
var PLAY = 16; | |
var NEXT = 19; | |
var fake_prev_el = document.createElement('div'); | |
fake_prev_el.id = "fake_prev_el"; | |
fake_prev_el.style.height = 0; | |
fake_prev_el.style.width = 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
## please note: this assumes you have a folder called _StartingSiteTemplate in ~/Documents. | |
## i have uploaded a zip of my _StartingSiteTemplate here: http://cl.ly/1u2W1K2Q192Z3C0r2J0x | |
## that file above is based off of paul irish's html5 boilerplate - highly recommended! | |
## NOTE: this is using textmate and LESScss, but those are easily configurable. | |
## NOTE: if rsync isn't working for you, note the file paths I'm using. | |
newSite(){ | |
echo "Please name the directory: " | |
read SITE_NAME | |
echo "Creating $SITE_NAME... zomg!" |
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
hate to bother you. im having trouble adding a challege_group via the console. i can see that when i do the following: | |
u = User.find(4) # 4 is my user id | |
u.challenges # returns a blank array | |
I get the desired results. However, I'm just not 100% sure of the syntax to add a challenges_group. I've tried a bunch of different things, and still no luck. |
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
array = [ :zero, :one, :two, :three, :four ] | |
print array.length # 5 | |
print :four == array[4] # true — zero-indexed, so array[4] is the 5th item. | |
print array[5].nil? # true | |
print array[6].nil? #true | |
print [] # nil | |
print array[5, 0] # nil | |
print [] == array[5, 0] # true b/c both are nil |
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
updateNav: function() { | |
Element.show('hoverNav'); | |
// if not first image in set, display prev image button | |
if((activeImage != 0) && ($("lightbox2").getStyle('display') === 'block')){ // only register these event handlers if the lightbox is active | |
Element.show('prevLink'); | |
document.getElementById('prevLink').onclick = function() { | |
myLightbox.changeImage(activeImage - 1); return false; | |
} |
NewerOlder