Skip to content

Instantly share code, notes, and snippets.

@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active May 14, 2024 19:38
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@juliushaertl
juliushaertl / google-location-history-to-gpx.md
Last active May 14, 2024 19:38
google-location-history-to-gpx

convert google takeout archive for location history from kml to gpx and split file into one per day

gpsbabel -i kml -f Location\ History.kml -o gpx -F out.gpx
gpsbabel -t -i gpx -f out.gpx -x track,merge,pack,split,title="ACTIVE LOG # %Y%m%d" -o gpx -F split.gpx
python2 gpxsplitter.py split.gpx
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 14, 2024 19:37
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@jmkgreen
jmkgreen / keycloak-compose.yml
Created August 3, 2017 09:01
KeyCloak docker-compose file for swarm stack launch purposes
version: '3.3'
services:
keycloak:
image: jboss/keycloak-mysql
environment:
- constraint:serverclass==gateway
- PROXY_ADDRESS_FORWARDING=true
- MYSQL_USER=keycloak
@shamansir
shamansir / _.js
Last active May 14, 2024 19:35
Parse and convert any SVG path to the list of commands with JavaScript + Regular Expressions
// svgPathToCommands('M10,10 l 5,7 C-5,7.2,.3-16,24,10 z');
//
// produces:
//
// [ { marker: "M", values: [ 10, 10 ] },
// { marker: "l", values: [ 5, 7 ] },
// { marker: "C", values: [ -5, 7.2, 0.3, -16, 24, 10 ] },
// { marker: "z", values: [ ] } ]
//
// commandsToSvgPath(svgPathToCommands('M10,10 l 5,7 C-5,7.2,.3-16,24,10 z'))
@btoone
btoone / curl.md
Last active May 14, 2024 19:32
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@SuppieRK
SuppieRK / CaseMatcher.kt
Last active May 14, 2024 19:29
Regular expressions for case matching
/**
* Different case matchers
*
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</
*/
sealed class CaseMatcher(private val regex: Regex) {
open fun notMatches(source: String?): Boolean {
return !matches(source)
}
@cfstras
cfstras / Installing tcpdump on an arm device without package manager.md
Last active May 14, 2024 19:29
Installing tcpdump on an arm device without package manager
DEVICE=1.2.3.4
MIRROR=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases
FEDORA=29
FILE=tcpdump-4.9.2-6.fc29.armv7hl.rpm  
PACKAGE=Everything/armhfp/os/Packages/t/$FILE

wget $MIRROR/$FEDORA/$PACKAGE

# see https://gist.github.com/cfstras/4856e48fd4d68eb7debaa20d5e63c6de
@mlocati
mlocati / win10colors.cmd
Last active May 14, 2024 19:29
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@nhtua
nhtua / 00.install-android-sdk.sh
Last active May 14, 2024 19:27
Run a Headless Android Device on Ubuntu server (no GUI)
#!/bin/bash -i
#using shebang with -i to enable interactive mode (auto load .bashrc)
set -e #stop immediately if any error happens
# Install Open SDK
apt update
apt install openjdk-8-jdk -y
update-java-alternatives --set java-1.8.0-openjdk-amd64
java -version