Skip to content

Instantly share code, notes, and snippets.

View AntoineLemaire's full-sized avatar
👨‍💻

Antoine Lemaire AntoineLemaire

👨‍💻
View GitHub Profile
@AntoineLemaire
AntoineLemaire / public_linux_mint_21.2_install.sh
Created September 1, 2023 19:44
My Linux Mint install script with all I need
#!/bin/bash
NODE_VERSION=12.13.1
GITHUB_EMAIL=
GITHUB_USERNAME=
NGROK_AUTH_TOKEN=
mkdir -p ~/Install
cd ~/Install
@AntoineLemaire
AntoineLemaire / weather_alert.js
Created December 2, 2020 20:03
Send Pushbullet notification when temperature is bellow 0 in the next 12h
var pushbullet_access_key = '123456789123456789'; // Can be create here : https://www.pushbullet.com/#settings/account
var accuweather_api_key = 'ABCDEFGHIJKLMNOPQRST'; // Find it https://developer.accuweather.com/user/me/apps
var accuweather_location_key = 123456; // Find it with https://developer.accuweather.com/accuweather-locations-api/apis/get/locations/v1/cities/search
function checkWeather() {
var accuweather_url = 'http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/';
var response =UrlFetchApp.fetch(accuweather_url + accuweather_location_key + '?apikey='+accuweather_api_key+'&metric=true', {
"method": "GET"
})
@AntoineLemaire
AntoineLemaire / deploy.sh
Last active November 29, 2020 08:46
Deploy web project
#!/bin/bash
GIT_URL="git@github.com:Username/MyProject.git"
ROOT_DIR="/var/www/my/web/folder"
GIT_DIR="${ROOT_DIR}/git"
RELEASE_DIR_NAME="releases"
RELEASE_DIR="${ROOT_DIR}/${RELEASE_DIR_NAME}"
DEPLOY_DIR="${RELEASE_DIR}/$(date '+%Y%m%d%H%M%S')"
KEEP_RELEASES=3 # Change this to keep more or less releases
LAST_RELEASE_DIR=`readlink current`;
@AntoineLemaire
AntoineLemaire / DailyScrumHelper.gs
Last active April 20, 2020 08:22 — forked from SebastienTainon/DailyScrumHelper.gs
Daily Scrum Helper with integration with Jira, Github and Google Calendar API
// In Google Drive, create a new document of type Google Script. If it does not exist, use "Connect more apps" to enable Google Scripts
// Copy-paste this script into the content of the Google Script
// This script sends you at each execution an email with Github commits of last day, Jira modified tickets of last day, Google Calendar events of last day, and Google Calendar events of current day
// For Jira, just put your username and password. Use https://id.atlassian.com to get them, change password if necessary
// For Calendar access, in Google Script, go to Resources > Advanced Google Services and enable "Calendar API"
// For Github, it's complicated... you have to follow this tutorial: https://www.benlcollins.com/apps-script/oauth-github
// For Slack : Go to https://api.slack.com/legacy/custom-integrations/legacy-tokens, log in with your slack account, and refresh the page. You'll be able to get a Legacy Token. (This will end on May 5th, 2020, we need to move to Slack Apps...)
// Last step, make the scrip