Skip to content

Instantly share code, notes, and snippets.

View ThomasG77's full-sized avatar

Thomas Gratier ThomasG77

View GitHub Profile
@varungpt
varungpt / install-pgmodeler.md
Last active February 12, 2022 03:16
Build Pgmodeler from source on ubuntu 20.04
@jlacko
jlacko / rstudio-init-script.R
Last active July 7, 2021 21:35
Init script for new RStudio installation, promoting best practices
# make certain jsonlite is available
if(!require(jsonlite, quietly = TRUE)) {
install.packages("jsonlite")
library(jsonlite)
}
# get the path to settings file
path <- if (Sys.info()[["sysname"]] == "Windows") {
paste0(Sys.getenv('APPDATA'), "\\RStudio\\rstudio-prefs.json")
} else {
@PurpleBooth
PurpleBooth / README.md
Last active September 8, 2023 20:52
A github workflow pipeline for rust that does test, build and deploy windows, linux and mac, creates releases, and does SemVer Versioning, and releases to a homebrew tap

Features

  • Automatically bump SemVer
  • Update a personal homebrew tap
  • Keep that pesky version in the Cargo.toml up to date
  • (From dependabot) Get new versions out as soon as possible

Assumptions

  • You don't want a changelog
@ca057
ca057 / exif-to-json.md
Last active May 7, 2022 16:37
Extracting EXIF data into JSON

command line tools for working with images to json

Extract all exif data as list into a json file:

exiftool -j -q dir > data.json

Sort the exif data by the original creation time:

jq 'sort_by(.DateTimeOriginal)' data.json
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@dlime
dlime / CMakeLists.txt
Last active May 12, 2023 13:36
Install Google Test and Google Mock on Ubuntu
cmake_minimum_required(VERSION 3.5)
project(example LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
@reegnz
reegnz / README.md
Last active April 23, 2024 18:36
Implementing a jq REPL with fzf

Implementing a jq REPL with fzf

Update: I created jq-zsh-plugin that does this.

One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).

Another one of my favourite tools is fzf.

@raveenb
raveenb / ssh_into_android.md
Last active April 18, 2024 06:27
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@JamesChevalier
JamesChevalier / overpass_query_all_streets.md
Last active March 20, 2024 13:33
Overpass API query to retrieve all streets in a city

An area ID in Overpass is the OSM relation ID + 3600000000

This information is kind of buried in the Overpass API wiki page documenting the available filters: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_area_.28area.29

The OSM relation ID can be seen in two places:

  • Visit https://www.openstreetmap.org and search for the city
  • Click on its entry and you will be taken to a https://www.openstreetmap.org/relation/SOME_NUMBER_HERE page
  • The relation ID is in the URL as "SOME_NUMBER_HERE" in the bullet point above
  • The relation ID will also be in parentheses next to the city name in the left column
@mdouchin
mdouchin / qgis_deploy_install_upgrade_ltr.ps1
Created June 11, 2019 10:36 — forked from Guts/qgis_deploy_install_upgrade_ltr.ps1
Use OSGeo4W installer command-line abilities to provide a real-life example like downloading and installing QGIS LTR full meta-package
#Requires -RunAsAdministrator
<#
.Synopsis
Download the OSGeo4W installer then download and install QGIS LTR (through the 'full' meta-package).
.DESCRIPTION
This script will:
1. change the current directory to the user downloads folder
2. download the OSGeo4W installer
3. launch it passing command-line parameters to DOWNLOAD packages required to QGIS LTR FULL