Skip to content

Instantly share code, notes, and snippets.

@robbibt
robbibt / dea_in_r.R
Last active May 10, 2024 10:44
Loading and analysing Digital Earth Australia Sentinel-2 data in R with `rstac` and `gdalcubes`
"""
This code demonstrates how to load Digital Earth Australia Sentinel-2 Analysis Ready Data into R.
It uses `rstac` to search for available data for a time and location using DEA's STAC endpoint,
and `gdalcubes` to load and analyse the data.
Functionality includes:
* Creating a custom pixel grid to reproject data into
* Apply a cloud mask using the "s2cloudless" cloud mask
* Combine data into seasonal composites
* Create an RGB animation
@sicksand
sicksand / dbase
Last active May 10, 2024 10:39
Install dbase file in php
How to on Ubuntu (15.04):
1) install php5-dev
sudo apt-get install php5-dev
2) install dbase via pecl
sudo pecl install dbase
3) load extension
@localmin
localmin / keymap.cson
Last active May 10, 2024 10:37
My keybindings for Inkdrop's vim plugin
{
".CodeMirror.vim-mode": {},
".CodeMirror.vim-mode.normal-mode textarea": {
"escape": "vim:reset-normal-mode"
},
".CodeMirror.vim-mode:not(.insert-mode):not(.key-buffering) textarea": {
"h": "vim:move-left",
"left": "vim:move-left",
"backspace": "vim:move-left",
"l": "vim:move-right",
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 10, 2024 10:36
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.

@lavr
lavr / send_email.py
Last active May 10, 2024 10:35
std email vs emails
# see also: http://code.activestate.com/recipes/578150-sending-non-ascii-emails-from-python-3/
import os
import smtplib
from email.utils import formataddr
from email.utils import formatdate
from email.utils import COMMASPACE
from email.header import Header
@abelcallejo
abelcallejo / README.md
Last active May 10, 2024 10:32
Create bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

# ██████╗ ███████╗███╗ ███╗ ██████╗ ██╗ ██╗███████╗ ██╗ ██╗██████╗
# ██╔══██╗██╔════╝████╗ ████║██╔═══██╗██║ ██║██╔════╝ ██║ ██║██╔══██╗
# ██████╔╝█████╗ ██╔████╔██║██║ ██║██║ ██║█████╗ ███████║██████╔╝
# ██╔══██╗██╔══╝ ██║╚██╔╝██║██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██║██╔═══╝
# ██║ ██║███████╗██║ ╚═╝ ██║╚██████╔╝ ╚████╔╝ ███████╗ ██║ ██║██║
# ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝╚═╝
#
# ██████╗ ██╗ ██████╗ █████╗ ████████╗██╗ ██╗ █████╗ ██████╗ ███████╗
# ██╔══██╗██║ ██╔═══██╗██╔══██╗╚══██╔══╝██║ ██║██╔══██╗██╔══██╗██╔════╝
# ██████╔╝██║ ██║ ██║███████║ ██║ ██║ █╗ ██║███████║██████╔╝█████╗
@ForsakenHarmony
ForsakenHarmony / protocol.md
Last active May 10, 2024 10:27
dbx DriveRack PA2 protocol exploration

PA2 protocol

  • port: 19272
  • protocol: text over TCP (UDP might also be possible)

PA2 Control

Searching for devices

Broadcast (UDP)

#include <stdio.h>
#include <stdlib.h>
struct node{
int data;
struct node* next;
}*head = NULL;
void insert(int data){
struct node* newNode;
newNode = (struct node*)malloc(sizeof(struct node));