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
class App extends React.Component { | |
constructor() { | |
super(); | |
this.state = { showPicker: true }; | |
} | |
componentDidUpdate() { | |
console.log(document.querySelectorAll(".pika-single")); | |
} |
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
{ | |
"name": "name", | |
"version": "0.0.1", | |
"description": "desc", | |
"main": "index.js", | |
"scripts": { | |
"test": "make test", | |
"preinstall": "find vendor -type d -maxdepth 1 | tail -n 2 | cut -c8- | xargs -L 1 -I {} rm -f node_modules/{}", | |
"postinstall": "find vendor -type d -maxdepth 1 | tail -n 2 | cut -c8- | xargs -L 1 -I {} sh -c 'ln -s \"$(pwd)/vendor/{}\" node_modules/{}; cd vendor/{} && npm install'" | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>z-index test</title> | |
<style> | |
body { | |
z-index: 100; | |
background: white; | |
} | |
div { |
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
App.ApplicationController = Em.Controller.extend({ | |
notifictions: Blocks.Notifications.create(), | |
actions: { | |
notify: function() { | |
if (typeof obj === 'string') { | |
obj = { message: obj }; | |
} | |
this.get('notifications').createNotification(obj); | |
}, |
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
// visit localhost:3000/test/demo.html | |
// run this snippet from chrome dev tools sources panel | |
agent = new Agent(); | |
userIds = agent.makeIds('users', 2); | |
agent.group('users', function() { | |
this.fixture(userIds[1], { first: 'Joey', last: 'Trapp' }); | |
this.fixture(userIds[2], { first: 'Lee', last: 'Forkenbrock' }); | |
}); |
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
# Reset | |
Color_Off='\e[0m' # Text Reset | |
# Regular Colors | |
Black='\e[0;30m' # Black | |
Red='\e[0;31m' # Red | |
Green='\e[0;32m' # Green | |
Yellow='\e[0;33m' # Yellow | |
Blue='\e[0;34m' # Blue | |
Purple='\e[0;35m' # Purple |
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
battle = (function() { | |
function completelyAccurateBattleCalculator() { | |
return Math.floor((Math.random()*10)+1); | |
} | |
function predictWinner(i) { | |
if (i >= 1 && i < 5) { | |
return 'goku'; | |
} else if (i > 5 && i <= 10) { | |
return 'jl'; |
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 | |
class SeedShell extends AppShell { | |
public $seedFile = 'seed.php'; | |
public $seedDevFile = 'seed_dev.php'; | |
public function main() { | |
$this->includeFile($this->absolutePath($this->getFile())); | |
} |
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
task :test do | |
cmd = 'shell command to run' | |
rd, wr = IO::pipe | |
pid = Process.fork do | |
$stdout.reopen(wr) | |
rd.close | |
exec(cmd) | |
end | |
wr.close | |
rd.each { |line| puts line } |
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
App.Router.map(function() { | |
this.resource('posts', function() { | |
this.resource('post', { path: '/:post_id' }, function() { | |
this.resource('permissions', function() { ... }); | |
}); | |
}); | |
}); | |
App.PermissionsRoute = Ember.Route.extend({ | |
model: function() { |