curl -sS https://gist.githubusercontent.com/Leko/b89c2737034005c304b5d4c329fc9c73/raw/c4b7d8a95b35fb4b8a7e8875b2d29d4496c87b78/cws > /usr/local/bin/cws
chmod +x /usr/local/bin/cws
cws
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
const setUp = () => { | |
const org = document.getElementById('_emoticon') | |
org.dispatchEvent(new MouseEvent('click')) | |
org.dispatchEvent(new MouseEvent('click')) | |
} | |
setUp() | |
const getter = (attr) => (obj) => obj[attr] |
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
#!/usr/bin/env php | |
<?php | |
function help() | |
{ | |
echo <<<HELP | |
Usage of phpdoc | |
Command: |
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
'use strict' | |
const shuffle = (list) => { | |
let i, j, temp | |
if (typeof list === 'string') { | |
list = list.split('') | |
} else if(Array.isArray(list)) { | |
list = list.slice() | |
} | |
i = list.length |
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> | |
<meta charset="UTF-8"/> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> | |
<script type="text/babel"> | |
'use strict' | |
// write code here!! | |
let foo = 'works!' |
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 | |
declare(ticks = 1); | |
class Pixel { | |
const BG_BLACK = 40; | |
const BG_RED = 41; | |
const BG_YELLOW = 43; | |
const COLOR_RESET = 49; |
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
PLAY [default] **************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [192.168.33.20] | |
TASK: [update apt-get] ******************************************************** | |
ok: [192.168.33.20] | |
TASK: [upgrade apt-get] ******************************************************* | |
changed: [192.168.33.20] |
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 CallCounter { | |
private $target; | |
private $counts = array(); | |
public static function stub(&$target) | |
{ | |
new self($target); | |
} |
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 Invoker implements ArrayAccess { | |
private $targets; | |
public function __construct(array $targets) { | |
$this->targets = $targets; | |
} | |
public function __call($method, array $args) { |