Skip to content

Instantly share code, notes, and snippets.

View outadoc's full-sized avatar

Baptiste Candellier outadoc

View GitHub Profile
@outadoc
outadoc / minecon.php
Created February 2, 2013 22:07
minecon.php, a script that I used to be notified when the clock on minecon.mojang.com started ticking (which meant the tickets were going to be sold).
<?php
require 'nmaApi.class.php';
function get_web_page($url)
{
//echo "curl:url<pre>".$url."</pre><BR>";
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
@outadoc
outadoc / pushover
Last active October 24, 2024 12:31
Pushover Bash Script
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
@outadoc
outadoc / Keolis-API.md
Last active November 15, 2024 18:27
Keolis Real-time API

Keolis "open-data" : XML Realtime API

Les données retournées sont au format XML.

Document trouvé et modifié depuis Pastebin.

Récupérer la liste des lignes

@outadoc
outadoc / backup.sh
Created August 30, 2014 12:19
A quick and easy-to-use incremental backup script.
#!/bin/sh
# Root path of the directory to backup
ROOT_DATA_DIR="/media/Data"
# Root path for the backup directory
ROOT_BACKUP_DIR="/media/outadoc/Stanley/Backup"
# Begin backup script, and print a quote
echo "Commencing backup procedure."
### colors
RED="\e[0;31m"
GREEN="\e[0;32m"
CLR="\e[0m"
echo ""
### check internet connectivity
INTERNET_WGET=`wget -q --tries=10 --timeout=20 -O - http://google.com > /dev/null`
INTERNET_STATUS="${RED}DOWN$CLR"
@outadoc
outadoc / pushbullet.sh
Created May 22, 2015 17:36
Pushbullet bash script
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
@outadoc
outadoc / GottaGoFastJS.swift
Last active May 14, 2016 09:10 — forked from b3ll/GottaGoFastJS.swift
Blazingly-Fast JSON Parser written in Swift
import Foundation
public typealias JSON = AnyObject
public func JSONWithData(data: NSData) throws -> JSON? {
return NSJSONSerialization.JSONObjectWithData(data, options: [])
}
#!/usr/bin/env python
#
# Copyright 2007-2013 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@outadoc
outadoc / obd_speedo_privacy_policy.txt
Last active February 9, 2017 20:38
OBD DeLorean Speedometer Privacy Policy
1. No private data leave the app, including the camera feed.
2. Actually, no data even leaves the app. It doesn't even require Internet permissions. It only ever interfaces with Torque.
@outadoc
outadoc / move_photos.sh
Last active November 7, 2020 15:59
Google Photos Takeout export EXIF fixer
# sort in date/month directories
exiftool -r "-Directory<DateTimeOriginal" -d "%Y/%m" -v .
# use CreationDate if DateTimeOriginal didn't work
exiftool "-Directory<CreationDate" -d "%Y/%m" -v .