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
Mix.install( | |
[ | |
{:phoenix_playground, "~> 0.1.6"}, | |
{:phoenix_test, "~> 0.3.2"} | |
], | |
config: [ | |
phoenix_test: [endpoint: Demo.Endpoint], | |
phoenix_playground: [ | |
{Demo.Endpoint, | |
[ |
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
[@react.component] | |
let make = (~className="", ~onSelect, ~children) => { | |
let fileInputRef: ReactDOMRe.Ref.currentDomRef = | |
React.useRef(None->Js.Nullable.fromOption); | |
let key = React.useRef(1); | |
let handleInputChange = | |
React.useCallback0(event => { | |
let files = ReactEvent.Form.target(event)##files; |
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
class App extends React.Component { | |
constructor() { | |
super(); | |
this.state = { showPicker: true }; | |
} | |
componentDidUpdate() { | |
console.log(document.querySelectorAll(".pika-single")); | |
} |
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": "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 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 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 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 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 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 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())); | |
} |
NewerOlder