Skip to content

Instantly share code, notes, and snippets.

View cjbrigato's full-sized avatar

Colin J. Brigato cjbrigato

View GitHub Profile
@cjbrigato
cjbrigato / nanarun.json
Last active January 27, 2023 00:58
nanarun.json
{
"version": "1.0.18.0",
"url": "https://github.com/M2Team/NanaRun/releases/download/1.0.18.0/NanaRun_1.0_Preview2_1.0.18.0.zip",
"extract_dir": "x64",
"bin": [ [ "MinSudo.exe", "minsudo" ] ]
}
@cjbrigato
cjbrigato / depends.sh
Created January 1, 2023 19:09
bash_multiprocess_with_complex_dependancies
#!/bin/bash
set -e
. <(base64 -d <<< X19fX19fXygpeyA6OyB9O18oKXsgOjsgfQ==)
_______ PREFLIGH UTILS _______________________________________________________________
NOW="$(date +%s)"
: ${STATES_DIR:=/tmp/spawn_states_$NOW}
mkdir -p "$STATES_DIR"
trap "rm -rf $STATES_DIR" EXIT

Keybase proof

I hereby claim:

  • I am cjbrigato on github.
  • I am cjbrigato (https://keybase.io/cjbrigato) on keybase.
  • I have a public key ASAyRm-syalvxdw4VjDlE7FF2k4-sb23A1d_YZEV__suQgo

To claim this, I am signing this object:

@cjbrigato
cjbrigato / each_with_position.rb
Created November 16, 2019 05:09 — forked from 2called-chaos/each_with_position.rb
Ruby Enumerable each_with_position (provides #first? #last? #prev #next ...)
##################################
### SCROLL DOWN FOR AN EXAMPLE ###
##################################
module Enumerable
# your each_with_position method
def each_pos &block
EachWithPosition.each(self, &block)
end
end
@cjbrigato
cjbrigato / Git checkout remote branch
Created April 11, 2018 01:03 — forked from markSci5/Git checkout remote branch
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test
@cjbrigato
cjbrigato / git-commands.mkd
Created April 1, 2018 05:05 — forked from Kerry350/git-commands.mkd
Common Git commands

A little lookup for commands I use frequently

  • Commit all edited files and add a message

git commit -a -m "My commit"

  • Add all new files

git add .

@cjbrigato
cjbrigato / K8s-DigitalOcean-CoreOS.md
Created April 1, 2018 05:03 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
defines.h:
// Force a functon to be copied&exec from RAM. Use sparingly
#define RAMFUNC __attribute((long_call, section(".ramfunc")))
ldscript:
The magic :
[...] memory from ldscript.. [...]
MEMORY
// nestable void in -> void out
void* *(*any_to_byte)(void * a){
byte_t a_asbyte = *((uint8_t*)a);
return a_asbyte;
}
//total transtype
typedef *(*any_to_byte)(void *) transtype;
@cjbrigato
cjbrigato / follow.c
Last active October 6, 2016 10:51
Best Joke since 1998
typedef void (*morpheusBullsh_t)();
morpheusBullsh_t follow(void* ra) {
uint8_t do = 0;
byte_t raBits = *((uint8_t*)ra);
for (uint8_t i = sizeof(*((uint8_t*)ra)) * 8; i > 0; i--) {
do = (raBits & 1);
raBits >>= 1;
}
if((*(char *)& 0x4321) != 0x21 ) {