This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import pathlib | |
import pycdlib | |
ubuntu = pathlib.Path('ubuntu-22.04.1-live-server-amd64.iso') | |
new_iso_path = pathlib.Path('ubuntu-22.04.1-live-server-amd64-auto.iso') | |
iso = pycdlib.PyCdlib() | |
iso.open(ubuntu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For recent versions of Ubuntu: | |
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/ | |
# Docs: | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference | |
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html | |
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53 | |
# Download ISO Installer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# script that fixes weird macOS 10.14 SDK issues | |
# SO: https://stackoverflow.com/questions/51314888/ld-warning-text-based-stub-file-are-out-of-sync-falling-back-to-library-file#comment93288538_53111739 | |
# script source: https://gist.github.com/wawiesel/eba461de5f5e38f7f0ac93ae3676b484 | |
# slightly modified to include PrivateFrameworks too | |
F=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks | |
G=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/PrivateFrameworks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* | |
* Calculates what Ada Lovelace labeled "B7", which today we would call the 8th | |
* Bernoulli number. | |
*/ | |
int main(int argc, char* argv[]) | |
{ | |
// ------------------------------------------------------------------------ | |
// Data |
- Install Go for Linux the usual way on your main Linux box:
cd
wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
tar -zxvf go1.8.linux-amd64.tar.gz
sudo mv go /usr/local/
export GOROOT=/usr/local/go
mkdir -p ~/.gitwork/go/src
mkdir ~/.gitwork/go/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!! | |
!! Implementation of JSONPatch (http://jsonpatch.com/) using PostgreSQL >= 9.5 | |
!! | |
CREATE OR REPLACE FUNCTION jsonb_copy(JSONB, TEXT[], TEXT[]) RETURNS JSONB AS $$ | |
DECLARE | |
retval ALIAS FOR $1; | |
src_path ALIAS FOR $2; | |
dst_path ALIAS FOR $3; | |
tmp_value JSONB; |
- Install Go for Linux the usual way on your main Linux box:
cd
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -zxvf go1.6.2.linux-amd64.tar.gz
sudo mv go /usr/local/
export GOROOT=/usr/local/go
mkdir -p ~/gitwork/go/src
mkdir ~/gitwork/go/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Electron's quick start sample, naively ported to Go | |
// https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md | |
// | |
// go get -u gopherjs | |
// gopherjs build main.go | |
// electron $(pwd) | |
package main | |
import ( |
NewerOlder