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
main: main.c bag.c bag.h | |
gcc -O3 -pthread -Wall bag.c main.c -o $@ | |
clean: | |
rm -f main |
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
let request = require('request'); | |
const MORE_OR_LESS = 1; | |
const NB_DAYS = 2; | |
function addIfNotExist(participantsAvailable, participants, iDate) { | |
for (let i = 0; i < participants.length; i++) { | |
if (participants[i].preferences[iDate] > 0 | |
&& participantsAvailable.indexOf(participants[i]) === -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
#!/bin/bash | |
# Get the redirect URL | |
# Because INSA have done some stupid configuration, | |
# You must use a non existing DNS in order to get it working | |
TEST_URL='http://insa.fr/' | |
NEW_LOCATION_URL=$(curl -Ls -o /dev/null -w %{url_effective} ${TEST_URL}) | |
HOSTNAME=$(echo ${NEW_LOCATION_URL} | awk -F/ '{print $3}') |
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 ChangePasswordPostfixAdminDriver implements \RainLoop\Providers\ChangePassword\ChangePasswordInterface | |
{ | |
/** | |
* @var string | |
*/ | |
private $sEngine = 'MySQL'; | |
/** |
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
const PEOPLE = [ | |
{ name: 'John Doe', email: 'johndoe@gmail.com' }, | |
{ name: 'Lea' }, | |
{ name: 'Bob' }, | |
]; | |
/** | |
* Return a new list shuffled. | |
* | |
* @param originalList {Array<Object>} |
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 script will create a base64 string that will be used by K8S to pull | |
* images from the Docker Registry. | |
* | |
* More info here: https://kubernetes.io/fr/docs/tasks/configure-pod-container/pull-image-private-registry/ | |
*/ | |
const encodeToBase64 = (str) => Buffer.from(str).toString('base64'); | |
const createFinalString = (obj) => encodeToBase64(JSON.stringify(obj)); |