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
var resque = require('./coffee-resque'); | |
process.on('SIGTERM', function() { | |
console.log('SIGTERM SIGNAL CAUGHT!!!'); | |
process.exit(0) | |
}); | |
var worker = resque.connect({ | |
host: 'xxx', | |
port: xxx, |
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
var cars = db.cars.find().toArray(); | |
for (var i in cars) { | |
var car = cars[i]; | |
car.imageSize = { w: 128, h: 64 }; // faut mettre quoi ici ? :p | |
/* afficher */ | |
printjson(car); | |
/* sauvegarder (on peut car _id est present) */ | |
db.cars.save(car) | |
} |
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
You give a 1-1000 number to each bottle. | |
You convert that number to binary. The maximum number (1000) takes 10 digits (decimal 1000 == binary 1111101000) | |
You number each rat 1-10. | |
For each bottle, you make the Nth rat drink if the bottle's Nth digit is 1. | |
You see which rats die, and determine the binary code for the poisoned bottle. | |
e.g. | |
if rats 2,3,8 die | |
then bottle 0010000110 is poisoned | |
i.e. bottle 134 is poisoned |
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
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
#!/bin/bash | |
CUR_DIR=$(pwd) | |
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m" | |
for i in $(find . -name ".git" | cut -c 3-); do | |
folder=$(printf '%s\n' "${i//\/.git/}") | |
# Go to folder |
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
--- | |
# Source: hlf-k8s/charts/ca/templates/secret--ca.yaml | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: network-org-1-peer-1-ca--ca | |
labels: | |
app: ca | |
heritage: "Tiller" | |
release: "network-org-1-peer-1" |
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
// LinkedIn recruiter search results highlighter. | |
// Paste into your browser's JavaScript console. | |
// | |
// Features: | |
// - Auto-expand experience items | |
// - Color experience items based on duration (red if less than 1 year, green if 2y+, etc) | |
// - Strike-through experience items containing certain keywords | |
// - Record profiles already seen in search results and hide them in subsequent searches (to enable, set config variable to true below) | |
// | |
// If you make improvements, feel free to reach out and I can merge them. <aurelien.gasser at gmail.com> |