SELECT * FROM tbl WHERE id = ANY($1) ORDER BY array_position($1, id);
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
schema { | |
query: Query | |
mutation: Mutation | |
subscription: Subscription | |
} | |
type Query { | |
coins: [Coin!]! | |
wallets(Ids:[ID!]) Wallet | |
} |
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
!#/bin/bash | |
fswatch -ro . | xargs -n 1 bash -c "go test" |
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: wait_for http | |
command: "curl --silent {{ url }}" | |
register: result | |
until: result.stdout.find("200 OK") != -1 | |
retries: 60 | |
delay: 1 | |
changed_when: false |
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
# this is just a reminder, NOT WORKING as a install script | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get update && | |
sudo apt-get install nvidia-367 | |
sudo apt-get install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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
Router.onBeforeAction -> | |
userId = Meteor.userId() | |
if @route?.options?.roles | |
if Roles.userIsInRole userId,@route.options.roles | |
@next() | |
else | |
@render("pageAccessDenied") | |
else if @route?.options?.authRequire |
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
Meteor.wrapAsync(function (callback) { | |
Meteor.setTimeout(function () { | |
callback(); | |
}, 1000); | |
})(); |
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
export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH | |
export LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH | |
export PATH=$PATH:$LD_LIBRARY_PATH | |
for caffe build with cuDNN in ubuntu 14.04 |
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
apt-get update | |
apt-get upgrade | |
apt-get install -y git wget | |
apt-get install -y node nodejs-legacy npm | |
npm i -g yo | |
apt-get install python-setuptools python-pip | |
pip install virtualenv fabric |
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
# abs path of current file | |
PATH_ABS = os.path.dirname(os.path.realpath(__file__)) |
NewerOlder