Skip to content

Instantly share code, notes, and snippets.

@outadoc
outadoc / CountryCode.kt
Created Feb 26, 2021
Country code to Unicode flag emoji in Kotlin
View CountryCode.kt
/**
* Converts an ISO 3166-1 alpha-2 country code to the corresponding Unicode flag emoji.
*
* ```
* "FR".countryCodeToUnicodeFlag() // 🇫🇷
* "US".countryCodeToUnicodeFlag() // 🇺🇸
* ```
*/
fun String.countryCodeToUnicodeFlag(): String {
return this
@outadoc
outadoc / move_photos.sh
Last active Nov 7, 2020
Google Photos Takeout export EXIF fixer
View move_photos.sh
# 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 .
@outadoc
outadoc / obd_speedo_privacy_policy.txt
Last active Feb 9, 2017
OBD DeLorean Speedometer Privacy Policy
View obd_speedo_privacy_policy.txt
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.
View twitter_auth.py
#!/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 / GottaGoFastJS.swift
Last active May 14, 2016 — forked from b3ll/GottaGoFastJS.swift
Blazingly-Fast JSON Parser written in Swift
View GottaGoFastJS.swift
import Foundation
public typealias JSON = AnyObject
public func JSONWithData(data: NSData) throws -> JSON? {
return NSJSONSerialization.JSONObjectWithData(data, options: [])
}
@outadoc
outadoc / pushbullet.sh
Created May 22, 2015
Pushbullet bash script
View pushbullet.sh
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
View login.sh
### 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 / backup.sh
Created Aug 30, 2014
A quick and easy-to-use incremental backup script.
View backup.sh
#!/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."
@outadoc
outadoc / Keolis-API.md
Last active Aug 7, 2021
Keolis Real-time API
View Keolis-API.md

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 / pushover
Last active Jun 18, 2022
Pushover Bash Script
View pushover
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2