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
@RandyMcMillan
RandyMcMillan / GNUmakefile
Last active May 20, 2022 14:42
make-help
.PHONY: - help
-: help
##help:print help
##test
## test
## test
## test
## test
##test:test
@RandyMcMillan
RandyMcMillan / node-and-npm-in-30-seconds.sh
Created March 12, 2022 19:00 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@RandyMcMillan
RandyMcMillan / git-remove-file.sh
Created March 9, 2022 17:01 — forked from bartlomiejdanek/git-remove-file.sh
remove file from git history
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
@RandyMcMillan
RandyMcMillan / git-checkout-b
Last active February 24, 2022 23:24
prepend a git branch with a UTC timestamp - with topic argument
#!/usr/bin/env bash
# Usage:
# Add this function to your .functions file so that it is available in what ever git repo you are working on.
# and
# source .functions
# or
# git clone https://gist.github.com/9651a6d8dfa88aaa070f8640834d8fea.git ~/9651a6d8dfa88aaa070f8640834d8fea
# source ~/9651a6d8dfa88aaa070f8640834d8fea
# git-checkout-b
# git-checkout-b test
@RandyMcMillan
RandyMcMillan / message-to-L0laL33tz@protonmail.com.txt.asc
Last active February 4, 2022 20:24
message-to-L0laL33tz@protonmail.com.txt.asc
-----BEGIN PGP MESSAGE-----
hQIMAxdB1PuMfZwhAQ/+M2jleXgmWfg11mk23hPR/mwK4VhG/GxmZXEGst8RTZPm
TOtlZjBi+Hl+kME+SqoBYSHHxXgoJPWrm8Z3XSOy4RXJoeLRIuRotU2HuBqh2E+1
aQgLqjS7zNUff7LQ+bHbQgvAHJznxoguPDMboUBakeMtuIXZSA1JWllgq95xAteN
7jlGxPvghST0C04PwhzxxowoLu1AZtqxYAIM5Fiks43d4HdXkBTKI0zASkTyxirD
BOSy2rviXbKup/SBLF16fFioxoZbpkHPRnCdQ0BZGFshbR6S+ZimM10GkslsxnLw
aZW+NcZhuv0vWgkzFRjw8ojdKtzcxyBqpWt6urZYnWG12914nS+W4ev18CNKcC9L
mporuzbygh59ptaEj08FVVZzHqWvumn7Tb2xhcbc/svntKR3F5MfZpXUAzSn1gNv
le0XtI7ws8XoV4SszR+EinOD6oeejE6YQIkHBq1ogZuVabpQz0oWcOxHJICA4bns
@RandyMcMillan
RandyMcMillan / .gitignore
Last active July 12, 2022 23:22
make help example
pyinbash.sh
pyscript.py
scripts
scripts/*
@RandyMcMillan
RandyMcMillan / main.cpp
Created November 18, 2021 19:47 — forked from peteristhegreat/main.cpp
QHoverEvent in a QPushButton (and leaveEvent and enterEvent)
#include <QApplication>
#include "mypushbutton.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MyPushButton pb;
pb.show();
return a.exec();
}
@RandyMcMillan
RandyMcMillan / bitcoind-ubuntu-install
Created November 14, 2021 06:23 — forked from rjmacarthy/bitcoind-ubuntu-install
Install Bitcoind Ubuntu
** Add repository and install bitcoind **
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/
@RandyMcMillan
RandyMcMillan / setup-cross-cc.sh
Last active November 18, 2022 02:09 — forked from xentec/setup-cross-cc.sh
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
@RandyMcMillan
RandyMcMillan / .gitignore
Last active May 28, 2022 21:18
python in bash
*.py