Skip to content

Instantly share code, notes, and snippets.

@madphilosopher
madphilosopher / pocketmod-example.ps
Created December 23, 2021 18:50
An example of a Pocketmod booklet written in PostScript
%!PS-Adobe-3.0
%%BoundingBox: 36 36 756 576
%%Title: DPG PocketMod
%%Reference: See https://pocketmod.com/howto for folding instructions
%%CreationDate: 2020-02-02
%%DocumentMedia: letter 612 792 0 ( ) ( )
%%Orientation: Landscape
%%Pages: 1
%%EndComments
%%BeginSetup
@ppoffice
ppoffice / README.md
Last active May 21, 2025 08:38
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@amitsnyderman
amitsnyderman / wav2flac.sh
Last active October 31, 2024 15:47
Convert wav to flac (16-bit / 44.1 kHz)
find . -name "*.wav" -exec ffmpeg -i {} -af aformat=s16:44100 {}.flac \;
@t2psyto
t2psyto / gist:f5453707d2658173715f49293d096fe5
Created July 14, 2017 04:15
powershell oneliner for encode/decode base64 to file
# encode from binary file to base64txt
powershell -C "& {$outpath = (Join-Path (pwd) 'out_base64.txt'); $inpath = (Join-Path (pwd) 'data.jpg'); [IO.File]::WriteAllText($outpath, ([convert]::ToBase64String(([IO.File]::ReadAllBytes($inpath)))))}"
# decode from base64txt to binary file
powershell -C "& {$outpath = (Join-Path (pwd) 'outdata2.jpg'); $inpath = (Join-Path (pwd) 'out_base64.txt'); [IO.File]::WriteAllBytes($outpath, ([convert]::FromBase64String(([IO.File]::ReadAllText($inpath)))))}"
@meresmclr
meresmclr / setup_gnuparallel.sh
Last active August 29, 2024 23:10
Install GNU Parallel on any system including Cygwin
#!/bin/bash
# useful for platforms such as Cygwin that don't currently have GNU Parallel in their repo.
# prerequisite: make
(
wd=$(mktemp -d)
wget -nc -P $wd ftp://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2
cd $wd
@protrolium
protrolium / ffmpeg.md
Last active June 1, 2025 19:07
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@robdyke
robdyke / conv-ova4vmx.py
Last active October 24, 2016 04:26 — forked from eshizhan/conv2vmx-ovf.py
script to convert VBox .ova export for import to VMWare ESXi
#!/usr/bin/env python
# Neova Health
# Helper script to convert VBox .ova export for import to VMWare ESXi
# usage:
# conv-ova4vmx.py some-vbox-export.ova
# forked from : https://gist.github.com/eshizhan/6650285
import sys
import tarfile
@gdiggs
gdiggs / tempserver.go
Created April 16, 2014 02:18
One Line Go server to serve static assets from current folder
echo "package main; import \"net/http\"; import \"os\"; import \"os/exec\"; import \"os/signal\"; func main() { go func() { sigchan := make(chan os.Signal, 2); signal.Notify(sigchan, os.Interrupt); <-sigchan; cmd := exec.Command(\"rm\", \"tempserver.go\"); cmd.Run(); os.Exit(0) }(); panic(http.ListenAndServe(\":8000\", http.FileServer(http.Dir(\".\")))) }" > tempserver.go && go run tempserver.go
@venkateshshukla
venkateshshukla / AndroidDevLinux
Last active September 19, 2023 04:20
Setting up your Linux for Android Application Development
Step 1. Preparation
--------------------
First take care of the dependencies for Android Application Development.
Dependencies are -
1. Java
2. ant
3. Eclipse and Android Development tools (IDE)
4. Android SDK and NDK
5. adb
@duncangraham
duncangraham / index.html
Last active June 26, 2020 11:19
a svg grid of stunning beauty
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%">
<defs>
<pattern id="grid" width="11" height="11" patternUnits="userSpaceOnUse">
<rect fill="white" x="0" y="0" width="9" height="9"/>
<rect fill="aliceblue" x="10" y="0" width="1" height="10"/>
<rect fill="aliceblue" x="0" y="10" width="11" height="1"/>
</pattern>
</defs>
<rect fill="url(#grid)" x="0" y="0" width="100%" height="100%"/>
</svg>