Skip to content

Instantly share code, notes, and snippets.

@schirrmacher
schirrmacher / AppleDeviceCheckService.ts
Last active May 10, 2024 10:50
DeviceCheck Backend Example Implementation for Validating iOS Device Authenticity
import jwt from "jsonwebtoken";
import uuid from "uuid";
import config from "../../../config";
import { DeviceCheckService, DeviceCheckParams } from "./DeviceCheckService";
import BaseService from "./BaseService";
export class AppleDeviceCheckService extends BaseService implements DeviceCheckService {
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@n0mi1k
n0mi1k / ipagrabber.py
Last active May 10, 2024 10:47
.IPA file extracter for Apple Configurator
import os
import shutil
"""
Steps to retrieve the IPA file from the Configurator app:
1. Install Apple Configurator from the Mac App Store and sign in
2. Connect your iOS device to your Mac
3. Select "Add > Apps..." and search for the app you want to install, click "Add"
4. The newer Apple Configurator deletes the IPA after installing it, so you'll need to use this tool to grab it
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 10, 2024 10:46
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@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