Skip to content

Instantly share code, notes, and snippets.

@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@jasmas
jasmas / umbrellactl
Last active April 30, 2024 11:03
umbrellactl: Bash script to check status, enable or disable Cisco Umbrella Roaming Security Module for AnyConnect on MacOS
#!/usr/bin/env bash
PLUGIN_BASE='/opt/cisco/secureclient/bin/plugins'
read -r -d '' USAGE << EGASU
Usage: `basename $0` [-s|-e|-d|-h]
-s, --status Print Umbrella Roaming Security module status
-e, --enable Enable Umbrella Roaming Security module
-d, --disable Disable Umbrella Roaming Security module
@algb12
algb12 / AppNapToggle.pl
Last active April 18, 2024 09:13
AppNapToggle.pl - App Nap disabler / enabler
#!/usr/bin/perl
use 5.010;
use vars qw($VERSION);
use strict;
use warnings;
use Getopt::Long qw(GetOptions);
Getopt::Long::Configure qw(gnu_getopt);
use Cwd 'abs_path';
use File::Basename;
@alexrah
alexrah / googlemonkeyr.user.js
Last active September 26, 2022 06:22
GoogleMonkeyR - GreaseMonkey / TamperMonkey script
// ==UserScript==
// @author mungushume
// @version 1.7.1
// @name GoogleMonkeyR
// @namespace http://www.monkeyr.com
// @description Google - Multiple columns of results, Remove "Sponsored Links", Number results, Auto-load more results, Remove web search dialogues, Open external links in a new tab, self updating and all configurable from a simple user dialogue.
// @include http://www.google.*/webhp?*
// @include http://www.google.*/search?*
// @include http://www.google.*/ig?*
// @include http://www.google.*/
@carimura
carimura / gist:7523120
Created November 18, 2013 05:50
Programming Comcast Controller for AppleTV
#*Step By Step Instruction*
##Set Apple TV to Aux Keys
--
Press Aux (Device) Button
Hold Setup Key until Aux Button Blinks Twice
Type in code 31115 (Aux Button will blink twice, if it is a long blink try last three steps again)
##Fix Play and Pause Keys
--
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active March 30, 2024 07:53
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@maxkandler
maxkandler / gist:5233150
Created March 24, 2013 19:25
Hide the iTerm2 Dock icon.
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist