Skip to content

Instantly share code, notes, and snippets.

View weskerfoot's full-sized avatar

Wesley Kerfoot weskerfoot

View GitHub Profile
@dov
dov / fish-to-cq.py
Last active April 22, 2024 17:47
Proof of concept importing svg into CadQuery
#!/usr/bin/python
######################################################################
# A proof of concept adding a svg path into a cadQuery Workspace
# object.
#
# This file is in the public domain.
#
# Dov Grobgeld <dov.grobgeld@gmail.com>
# 2024-03-10 Sun
import strformat
import karax / [karaxdsl, vdom]
# want to use this like so
# linkItem:
# a(href="/"): text "Main Page"
template linkItem(body: untyped): VNode =
buildHtml(li(class="hover:underline text-center")):
h4:
li: body
@atoponce
atoponce / 0-README.md
Last active December 21, 2023 13:07
Magic Hashes

Magic Hashes

Motivations

Calculating magic hashes for https://www.whitehatsec.com/blog/magic-hashes/. These strings should probably be put into a blacklist preventing users from using them as passwords to mitigate PHP evaluating hashes starting with "0e" as floats.

Probabilities

@robinsloan
robinsloan / shh.rb
Last active August 18, 2023 12:09
Disable RTs from all the people you follow on Twitter.
require "rubygems"
require "twitter"
# get these from apps.twitter.com
CONSUMER_KEY = "foo"
CONSUMER_SECRET = "bar"
OAUTH_TOKEN = "blee"
OAUTH_TOKEN_SECRET = "baz"
TWITTER_USER = "your_username" # needs to be the one associated with keys above
@Rich-Harris
Rich-Harris / README.md
Last active January 25, 2023 19:03
Unifying Rollup options

Rollup 0.48 introduces a few changes to the options object, because the current options are confusingly different between the CLI and the options exported by your config file.

Changes to the config file

  • entry is now input
  • sourceMap and sourceMapFile are now sourcemap and sourcemapFile (note casing)
  • moduleName is now name
  • useStrict is now strict

The dest and format options are now grouped together as a single output: { file, format, ... } object. output can also be an array of { file, format, ... } objects, in which case it behaves similarly to the current targets. Other output options — exports, paths and so on — can be added to the output object (though they will fall back to their top-level namesakes, if unspecified).

@jhorsman
jhorsman / semver-regex.md
Last active March 29, 2024 05:25
Semantic versioning regex
@binaerbaum
binaerbaum / arch-linux-install
Last active April 6, 2022 03:16 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap
@kyhau
kyhau / devpiNotes.md
Last active October 2, 2023 21:01
devpi Quick Start Guide

devpi Quick Start Guide

For details see Quickstart: uploading, testing, pushing releases

How to add the devpi index to your pip configuration file

Update C:\Users\username\pip\pip.ini on Windows 8/10, or ~/.config/pip/pip.conf on Linux

[global]
@bullshit
bullshit / Install Docker on Raspberry Pi (Arch Linux).md
Created April 11, 2014 21:22
Install Docker on Raspberry Pi (Arch Linux)

Install Docker on Raspberry Pi (Arch Linux)

Prepare SD Card

  1. Download Image
  2. Unzip Image
  3. Copy Image on SD Card (dd if=./ArchLinuxARM-2014.03-rpi.img of=/dev/disk2)
  4. Boot Raspberry Pi

Connect to Pi

  1. Find out IP
@magnusbae
magnusbae / git-stop-tracking-remote-branch.md
Created April 8, 2014 20:05
How to make Git stop track a remote branch without deleting the remote branch.

You don't have to delete your local branch.

Simply delete your remote tracking branch:

git branch -d -r origin/<remote branch name> (This will not delete the branch on the remote repo!)

See "Having a hard time understanding git-fetch"

there's no such concept of local tracking branches, only remote tracking branches.