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
// ==UserScript== | |
// @name Trello Timer | |
// @namespace http://blmarket.net/users | |
// @description Display open time for each cards | |
// @include https://trello.com/board/* | |
// @include https://trello.com/b/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
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
crypto = require('crypto') | |
cipher_key = "awegohaewiot2#%@#A#()GAWJVZDz34t#$TJOP#A$TA" | |
cipher = (txt) -> | |
c = crypto.createCipher('aes-256-cbc', cipher_key) | |
crypted = c.update(txt, 'utf8', 'hex') | |
crypted += c.final('hex') | |
return crypted |
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
#!/bin/bash | |
PATH=path/to/images | |
IMAGE=Image-`date +%Y%m%d-%H%M` | |
AWS_ACCESS_KEY=AGWEGAWEGAWEGAWEG | |
AWS_SECRET_KEY=waWG#reH5452HE23raWy432% | |
echo "building image ${IMAGE}" | |
sudo ec2-bundle-vol -k /home/ubuntu/.ssh/id_rsa -c /home/ubuntu/keys/server.crt -u USER_ID -r x86_64 --no-filter |
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
{ | |
init: function(elevators, floors) { | |
var MAX_LOAD = 4, elevatorSize = elevators.length; | |
var fetchElevator = function (floor, callback) { | |
var candidateIdx = -1, candidateDiff = elevatorSize + 1, candidateLoadFactor = .4; | |
var currf, fdiff; | |
for (var i = 0; i < elevatorSize; i++) { | |
currf = elevators[i].currentFloor(); | |
fdiff = Math.abs(currf - floor.floorNum()); | |
if (elevators[i].destinationQueue.length === 0 && |
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
sudo netstat -nltp | grep 4000 |
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
packages: | |
yum: | |
perl-DateTime: [] | |
perl-Sys-Syslog: [] | |
perl-LWP-Protocol-https: [] | |
perl-core: [] | |
perl-Switch: [] | |
perl-URI: [] | |
perl-Bundle-LWP: [] |
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
{ | |
"BD": "880", | |
"BE": "32", | |
"BF": "226", | |
"BG": "359", | |
"BA": "387", | |
"BB": "+1-246", | |
"WF": "681", | |
"BL": "590", | |
"BM": "+1-441", |
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
// 함수 호출 타이밍에 조건에 따라 promise 실행 분기 | |
// val1 == true, val3 == true인 경우: method1 -> method2 -> method3true | |
// val2 == true, val3 == false인 경우: method1 -> method2 -> method3false | |
// val1 == false, val3 == true인 경우: method2 -> method3true | |
// val2 == false, val3 == false인 경우: method2 -> method3false | |
function run(val1, val3) { | |
const p = Promise.resolve(null); | |
if (val1 === true) | |
p = p.then(method1); | |
p = p.then(method2); |
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
"모든 숫자 1씩 더하기 | |
:%s/\[\zs\d\+\ze\]/\=(submatch(0)+1) |
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
npm uninstall `ls -1 node_modules | tr '/\n' ' '` |