Skip to content

Instantly share code, notes, and snippets.

View GrayCygnus's full-sized avatar

M GrayCygnus

  • UVG, Aerobots
  • Guatemala
View GitHub Profile
@chewwt
chewwt / gdal_ubuntu_20.md
Created August 27, 2020 11:23
gdal for ubuntu 20.04 with python virtual env

Installing GDAL for Ubuntu 20.04

No need to add ppa anymore

sudo apt install gdal-bin libgdal-dev
workon <env>
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
@peterneave
peterneave / readme.md
Last active July 5, 2024 12:56
Install pgAgent on Postgres 10 (Debian Linux)

Install pgAgent on Postgres 10 (Debian Linux)

This assumes you will have pgAgent running on the same machine as your database.

Terminal

  1. Install pgAgent via package manager
sudo apt update
@Bonno
Bonno / mp4-to-wav
Created February 10, 2015 09:24
Convert mp4 to WAV with ffmpeg
ffmpeg -i <infile> -ac 2 -f wav <outfile>
@s-aska
s-aska / MainActivity.java
Last active December 7, 2019 14:15
Sortable ListView on Drag and Drop
package com.example.sortable.app;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@ekho
ekho / pgAgent daemon
Last active July 2, 2024 17:14
pgAgent daemon
http://www.ekho.name/2012/03/pgagent-debianubuntu.html
@ndarville
ndarville / secret-key-gen.py
Created August 24, 2012 17:01
Generating a properly secure SECRET_KEY in Django
"""
Two things are wrong with Django's default `SECRET_KEY` system:
1. It is not random but pseudo-random
2. It saves and displays the SECRET_KEY in `settings.py`
This snippet
1. uses `SystemRandom()` instead to generate a random key
2. saves a local `secret.txt`
@jinie
jinie / read.py
Created July 5, 2011 18:25
Read binary file in python and print hex output
#!/usr/bin/python
import sys,getopt
filename = None
blocksize = 1024
opts,args = getopt.getopt(sys.argv[1:],'f:b:')
for o,a in opts:
if o == '-f':