Skip to content

Instantly share code, notes, and snippets.

@jojonarte
jojonarte / win10_binary_fission.md
Created April 19, 2024 09:26 — forked from dragon788/win10_binary_fission.md
Making the Windows 10 "chubby" install.wim compatible with a FAT32 USB so a UEFI bootable USB can be created from Linux/macOS/ChromeOS

MAGIC aka Making Anything Gruelingly "Impossible" Coherent

Whatever operating system you are using to create the USB, you will need to have a Windows 10 ISO, either from Microsoft or your system manufacturer and have a USB drive 8GB or larger (or one with at least 5GB of free space and using the FAT32 filesystem, but using a fresh and empty one is best).

TL;DR

#macOS/Linux
# First try the `bootiso` program, it has options for splitting the WIM for you!
# https://jsamr.github.io/bootiso/
# You need to already have 7zip aka `p7zip` on macOS and Linux, and `wimlib` macOS via `brew` or `wimtools` on Linux
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@zdebra
zdebra / throttled_transport.go
Created June 15, 2021 14:48
NewThrottledTransport wraps transportWrap with a rate limitter, improvement of https://gist.github.com/MelchiSalins/27c11566184116ec1629a0726e0f9af5 since it allows use of *http.Client
package main
import (
"net/http"
"time"
"golang.org/x/time/rate"
)
// ThrottledTransport Rate Limited HTTP Client
@tillkruss
tillkruss / AppServiceProvider.php
Last active April 19, 2024 09:23
ElasticSearch engine for Laravel Scout
<?php
resolve(EngineManager::class)->extend('elasticsearch', function ($app) {
return new ElasticsearchEngine(
ElasticBuilder::create()->setHosts(config('scout.elasticsearch.hosts'))->build()
);
});
@miguelmota
miguelmota / i3-cheat-sheet.md
Last active April 19, 2024 09:21 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (window/command or alt by default depending on config)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@artokun
artokun / Hierarchy.txt
Last active April 19, 2024 09:21
Godot 4 3D RTS Camera Controller
World (Node3D)
|- RTSController (Node3D)
|- Elevation (Node3D)
|- MainCamera (Camera3D)
@inC3ASE
inC3ASE / SandboxBag
Created October 20, 2016 20:57
Library/Caches/com.apple.appstore
 streamtypedÅËÑ@ÑÑÑNSMutableDictionaryÑÑ NSDictionaryÑÑNSObjectÖÑiíÑÑÑNSStringïÑ+bagÜíÑÑÑ
NSMutableDataÑÑNSDataïñÇXƒÑ [115800c]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>search</key><string>https://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search</string>
<key>advancedSearch</key><string>https://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/advancedSearch?cc=us</string>
<key>searchHints</key><string>https://search.itunes.apple.com/WebObjects/MZSearchHints.woa/wa/hints</string>
<key>searchApi</key><string>https://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/searchApi</string>
<key>p2-book-search</key><string>https://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=ebook</string>
@cmparlettpelleriti
cmparlettpelleriti / R_EigenPCA_Plots.R
Last active April 19, 2024 09:18
Show students the relationship between Eigendecomp of Cor/Cov and the % variance explained for PCs
library(tidyverse)
library(MASS)
library(patchwork)
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# generate data with given cor matrix
a <- 0.9
s1 <- matrix(c(1,a,
a,1), ncol = 2)
@0x4D31
0x4D31 / beautiful_idiomatic_python.md
Last active April 19, 2024 09:17 — forked from JeffPaine/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@qoomon
qoomon / conventional_commit_messages.md
Last active April 19, 2024 09:17
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default