Skip to content

Instantly share code, notes, and snippets.

View RandyMcMillan's full-sized avatar
🛰️
Those who know - do not speak of it.

@RandyMcMillan RandyMcMillan

🛰️
Those who know - do not speak of it.
View GitHub Profile
@fxdpntthm
fxdpntthm / execv-example.c
Last active May 18, 2023 15:24
small sample program to demonstrate execv function usage
#include<stdio.h>
#include<errno.h>
#include<stdlib.h>
#include<strings.h>
#include<unistd.h>
#define BASH_EXEC "/usr/bin/bash"
#define LS_EXEC "/usr/bin/ls"
#define BSIZE 50
@xentec
xentec / setup-cross-cc.sh
Last active February 6, 2025 19:49
Alpine Linux cross-compiler setup script
#!/bin/sh
CTARGET="$1"
if [ -z "$CTARGET" ]; then
program=$(basename $0)
echo "usage: $program TARGET_ARCH"
return 1
fi
# get abuild configurables
@mafintosh
mafintosh / uint64.js
Last active November 26, 2022 00:01
var v0 = 0 // represent the first 24bit of an uint64
var v1 = 0 // next 8bit
var v2 = 0 // final 32bit
function addUint64 (b0, b1, b2) {
v0 = (v0 & 0xffffff) + b0 // cast to 24bit and add b0
v1 = (v1 & 0xff) + b1 + (v0 >>> 24) // cast to 8bit, add b1 one plus the carry from v0
v2 = (v2 + b2 + (v1 >>> 8)) | 0 // add b2 and carry from v1. cast to int to make v8 happy
}
@dmpanch
dmpanch / howto_create_online_radio_macos_sierra.txt
Last active June 30, 2024 06:14
How to create internet radio on MacOS Sierra 10.12
All actions are performed in Terminal.app.
1. Install Homebrew http://brew.sh/
2. Install Jack (route audio tool) http://jackaudio.org/. Current stable version from official website doesn't work with
MacOS Sierra (I use 10.12.3) so you need to download beta version from there https://yadi.sk/d/JwT10b7v3Dm5yy.
After installing reboot your computer.
3. Install Darkice (audio streamer) via brew.
@drpventura
drpventura / teaching.sql
Last active January 28, 2019 01:36
The teaching table creation and CSV file importation into MariaDB (MySQL) shown in the video at: https://youtu.be/smJFdYnphVk
use first;
create table teaching (
instr_name varchar(15),
course varchar(10)
);
-- NOTE: You will need to update the path to match where instr-classes.csv is.
load data local infile 'D:/Users/Phil/Downloads/instr-classes.csv'
into table teaching
fields terminated by ',';
@mafintosh
mafintosh / app.js
Last active November 26, 2022 00:03
Showcasing bundled prebuilds with different runtimes
var electron = require('electron')
electron.app.on('ready', function () {
var win = new electron.BrowserWindow({
width: 800,
height: 600
})
win.loadURL('file://' + __dirname + '/index.html')
win.toggleDevTools()
@maning
maning / Updating NYC building footprints.md
Last active August 12, 2016 03:41 — forked from planemad/Updating NYC building footprints.md
Refreshing NYC building footprints

NYC had an import of over 1 million building footprints and 900,000 addresses in 2014 from the New York City Department of Information Technology and Telecommunications (DoITT). The DoITT GIS releases an updated shapefile of the footprints every quarter, and the latest version can be accessed here: Building footprints | Address points

Open datasets like these are a great opportunity to explore how OSM can be used as a bridge between authoritative information and that crowdsourced by citizens. Two years after the import, it is interesting to see how the OSM data compares with the latest official footprints. The interesting questions to ask is:

  • What has improved in the DoITT footprints that can be updated in OSM?
  • What has
@RandyMcMillan
RandyMcMillan / .description
Last active August 11, 2017 00:55 — forked from Zverik/recursive_index.pl
Create index.htm with a list of all files
recursive_index.pl : Sample Description
@ar-pa
ar-pa / BigInt.cpp
Last active March 24, 2025 01:15
bignum class for C++
// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e2 + 14, lg = 15;
@dstapp
dstapp / download_podcasts.sh
Created January 1, 2016 16:35
A bash script for automatically downloading new podcast episodes and pretty-printing new files. Works on Linux and BSD/OS X
#!/usr/bin/env bash
# The following script parses podcast feeds and downloads all podcast episodes listed in
# the feed if they don't exist within the target path. The target directory will be created
# if it does not exist.
[ -x "$(command -v wget)" ] || (echo "wget is not installed" && exit 1)
[ -x "$(command -v sed)" ] || (echo "sed is not installed" && exit 1)
[ -x "$(command -v xargs)" ] || (echo "xargs is not installed" && exit 1)