Skip to content

Instantly share code, notes, and snippets.

@slayer
slayer / cloudflare-delete-all-records.sh
Last active May 14, 2024 21:26
Delete all DNS records for specified zone
#!/bin/bash
TOKEN="xxxxxxxxxxxxxxxxxxx"
ZONE_ID=2222222222222222222222222
# EMAIL=me@gmail.com
# KEY=11111111111111111111111111
# Replace with
# -H "X-Auth-Email: ${EMAIL}" \
# -H "X-Auth-Key: ${KEY}" \
@wmcmurray
wmcmurray / BasicCustomShader.js
Last active May 14, 2024 21:23
A basic example of a ThreeJS (r108) ShaderMaterial with shadows, fog and dithering support.
import { mergeUniforms } from 'three/src/renderers/shaders/UniformsUtils.js'
import { UniformsLib } from 'three/src/renderers/shaders/UniformsLib.js'
export default {
uniforms: mergeUniforms([
UniformsLib.lights,
UniformsLib.fog,
]),
@loilo
loilo / pass-slots.md
Last active May 14, 2024 21:22
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@mattatz
mattatz / Quaternion.hlsl
Last active May 14, 2024 21:22
Quaternion structure for HLSL
#ifndef __QUATERNION_INCLUDED__
#define __QUATERNION_INCLUDED__
#define QUATERNION_IDENTITY float4(0, 0, 0, 1)
#ifndef PI
#define PI 3.14159265359f
#endif
// Quaternion multiplication
@fvollmer
fvollmer / gist:897654cd6e3eb0c94c5d3cb62519f570
Created July 19, 2019 19:00
Failed boot of openwrt for the GS108Tv2
CFE-NTSW-B5.1.0.2 for GS1XXT (32bit,SP,BE,MIPS)
Build Date: Wed Aug 11 18:05:01 IST 2010 (yrdreddy@lc-hyd-001)
Copyright (C) 2000,2001,2002,2003,2004,2005 Broadcom Corporation.
Initializing Arena.
Initializing Devices.
Board : GS108T
CPU type 0x29050: 200MHz
Total memory: 0x4000000 bytes (64MB)
@oriolbx
oriolbx / index.html
Last active May 14, 2024 21:18
custom zoom buttons with Lealfet.js
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<!-- include cartodb.js library -->
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
<style>
@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active May 14, 2024 21:16 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Relax
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_relax/bbc_radio_one_relax.isml/bbc_radio_one_relax-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@mwodz
mwodz / maildir-timestamp-fix.sh
Last active May 14, 2024 21:12 — forked from pimpreneil/fix-email-maildir-timestamps.sh
Fix timestamp for files in Maildirs
#!/usr/bin/env bash
#
# Fix emails with bad timestamps in a Maildir
#
# which are usually resulting from moves in IMAP clients
# If the client then doesn't ask Dovecot for a specific sorting, they will be shown in the order of the filename
# based timestamp.
#
# This script reads the date from the email header and set its UNIX timestamp and renames it with the proper date
@ubidefeo
ubidefeo / NanoRP2040_OSC.ino
Created May 18, 2021 12:56
OSC Message sender for Arduino Nano RP2040 Connect
/* This Sketch is tested on
* - Nano 33 RP2040 Connect
* - Nano 33 IoT
* - MKR WiFi 1010
To compile and use it requires
Libraries:
- CNMAT OSC Library (https://github.com/CNMAT/OSC) - Arduino Library Manager
- Arduino WiFiNINA (https://github.com/arduino-libraries/WiFiNINA) - Arduino Library Manager
@wronk
wronk / python_environment_setup.md
Last active May 14, 2024 21:10
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon