Skip to content

Instantly share code, notes, and snippets.

View XertroV's full-sized avatar

Max Kaye XertroV

View GitHub Profile
@XertroV
XertroV / github-status.py
Created May 5, 2020 20:45
script to set github status for commit SHA
#!/usr/bin/env python3
# based on: https://gist.githubusercontent.com/minimal/3799247/raw/b960a004e3b44ed34c39a5d35a3f57bc26f75e1e/githubstatus.py
import logging
import json
import argparse
import requests
@XertroV
XertroV / ubuntu-setup-remote-luks-unlock.sh
Created April 29, 2020 23:23
installs the stuff and does some config for a dracut-ssh-crypt like setup -- ssh into initramfs to unlock the luks partition
#!/usr/bin/env bash
# installs the stuff and does some config for a dracut-ssh-crypt like setup -- ssh into initramfs to unlock the luks partition
sudo apt install dropbear{,-initramfs}
DB_CONFIG=/etc/dropbear-initramfs/config
DB_AUTH_KEYS=/etc/dropbear-initramfs/authorized_keys
sudo mkdir -p /etc/dropbear-initramfs
@XertroV
XertroV / watch.sh
Last active September 5, 2019 01:24
Watch.sh - a generic watch-for-files-and-restart-a-command utility for linux.
#!/usr/bin/env bash
# if you have issues, try increasing /proc/sys/fs/inotify/max_user_watches
usage(){
echo "$0 -i 'INCLUDE_FILES' [-e 'EXCLUDE_FILES'] -c 'COMMAND'"
cat << EOF
watch.sh - a generic watch-for-files-and-restart-a-command utility for linux.
Author: Max Kaye
License: Public Domain
@XertroV
XertroV / onerednail.md
Last active November 18, 2020 17:02
onerednail.com

One Red Nail

A statement on the importance of philosophy and morality in daily life.

v1.2, 2020-11-19, Max Kaye. (revisions)

I no longer endorse this idea

I have changed my mind about this idea. I'm leaving the rest of the document (after this section) as it is for the moment. I might change things later.

@XertroV
XertroV / Onerednail-draft.md
Last active March 6, 2019 12:42
Draft for onerednail.com

One Red Nail

A statement on the importance of philosophy and morality in daily life.

The Physical

The left hand ring finger's nail is painted red.

The Background

> var c = eth.contract([{
"constant": true,
"inputs": [],
"name": "getCount",
"outputs": [
{
"name": "count",
"type": "uint256"
}
],
@XertroV
XertroV / ctfHelpers.sol
Last active June 17, 2018 02:38
Eth CTF Helpers
pragma solidity ^0.4.24;
contract _useful {
mapping (address => bool) public owners;
address[] deployed;
event Deployed(address d);
event SD();
const IPFS = require('ipfs-api');
const R = require('ramda');
const async = require('async');
const child_process = require('child_process')
const ipfs = IPFS('localhost', '5001', {protocol: 'http'});
let size = 0;
let nErrors = 0;
@XertroV
XertroV / gist:d503a1e9db4bc1fd617c5ee20a619c4c
Created February 22, 2018 10:28
Copy of chat log from Flux slack - #dev - 21-22 Feb 2018

<continued from #general>

Sven Mason [15:52] I have not used Digital Ocean before (where the forum is currently hosted), it seems like there is more admin involved than eg AWS, but it is cheaper. Maybe AWS would take less admin resources than Digital Ocean once it is setup? Also AWS being the larger perhaps there is a higher chance supporters will have experience working with it? (this is if we chose a self-hosted environment). We could stay with Digital Ocean if Max wanted and try to fix what is going wrong there, to do that we could discuss admin access protocol with @max?

Max Kaye [16:51] Whoops - posted reply in #general @sventhebarbarian - Auto updates actually stopped working - it's manual updates that are breaking 😕 DO and AWS are equiv in terms of admin - DO is actually a bit nicer I think bc you can reset pws easily and share nodes much more easily (via a team) than you can with AWS

@XertroV
XertroV / gist:5001704845eeba1075c1abfb7fb1fc86
Created December 21, 2017 18:04
purescript docs error
Error found:
in module Test.QuickCheck.Gen
at <path>/bower_components/purescript-quickcheck/src/Test/QuickCheck/Gen.purs line 79, column 16 - line 79, column 52
No type class instance was found for
Control.Monad.Rec.Class.MonadRec (State
{ newSeed :: Seed
, size :: Int
}