Skip to content

Instantly share code, notes, and snippets.

View supermamon's full-sized avatar

Raymond Velasquez supermamon

View GitHub Profile
@supermamon
supermamon / setup-theos-linux.sh
Last active July 3, 2018 10:59
A single script to setup github.com/theos/theos in Linux. Includes sdks and toolchain.
# Script is available at https://github.com/supermamon/install-theos
# Or if you trust me run
curl -LO https://git.io/install-theos && bash install-theos
@supermamon
supermamon / Respring_with_posix_spawn.mm
Last active January 14, 2021 06:06
Respring with posix_spawn
#include <spawn.h>
#include <signal.h>
...
pid_t pid;
int status;
const char *argv[] = {"killall", "SpringBoard", NULL};
posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char* const*)argv, NULL);
waitpid(pid, &status, WEXITED);
@supermamon
supermamon / setup-theos-on-cygwin.sh
Last active October 25, 2021 09:40
Script to install theos on windows/cygwin
# Script is available at https://github.com/supermamon/install-theos
# Or if you trust me run
curl -LO https://git.io/install-theos && bash install-theos

Keybase proof

I hereby claim:

  • I am supermamon on github.
  • I am rmv (https://keybase.io/rmv) on keybase.
  • I have a public key ASDOzUt8PgRaNZn996WnwcTCwEoX5PlQeYIJBD0NX1eFfgo

To claim this, I am signing this object:

{
"env": {
"node": true,
"es6": true
},
"rules": {
/* Possible Errors */
"no-extra-boolean-cast": "error",
/* Best Practices */
04faf70e42b2b6bb59b128612602ab5890d1ba6990ae6f072bbb45da79c9b7acdcb2f48545917498b3c0f2be603b375fb46311eafb56ce8c44b28e35f90d5ba308;jmatty198
#!/bin/bash
VERSION=1.0
function usage() {
prog=$(basename "$0")
echo "Syntax: $prog [-p] <filename> [language]" >&2
echo " $prog -u <paste> <filename> [language] - Update <paste>" >&2
echo " $prog -e <paste> [language] - Edit <paste> in \$EDITOR (or vi.)" >&2
echo " $prog -d <paste> - Delete <paste>" >&2
echo " $prog -s <paste> - Show <paste>" >&2
// get it here instead
// https://github.com/supermamon/scriptable-scripts/tree/master/xkcd-widget
@supermamon
supermamon / require-example.js
Last active January 10, 2022 19:41
port of node's `require` for Scriptable.app
const require = importModule('scriptable-require')
const moment = await require('moment', true)
log(moment().format('dddd'))
@supermamon
supermamon / TapFunctions.js
Created December 1, 2020 23:01
PoC of tap targets calling functions
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: magic;
// PoC: run functions from tap targets
if (args.queryParameters.fn) {
switch (args.queryParameters.fn) {
case 'fn1':
fn1()
break;