Skip to content

Instantly share code, notes, and snippets.

View dunn's full-sized avatar
💭
no

Alexandra Catalina dunn

💭
no
View GitHub Profile
@kentbrew
kentbrew / pinmarklet.md
Last active December 16, 2024 20:48
How to recreate your long-lost Pinterest bookmarklet.

How to recreate your long-lost Pinterest bookmarklet.

Right-click your bookmarks bar and choose Add Page (Chrome) or New Bookmarklet (Firefox).

In Name, put this:

Pin It

In URL, put this:

@k2nr
k2nr / .Xmodmap
Last active September 27, 2021 03:27
NixOS configuration for MacBookPro retina 15 early 2012
keycode 97 = grave asciitilde
keycode 132 = grave asciitilde
default: all
SRC := $(wildcard *.c)
EXE := $(SRC:.c=)
all: $(EXE)
%: %.c
clang $< -o $@
@pablote
pablote / install-nginx-rtmp.sh
Last active September 17, 2020 20:06
Install nginx, nginx-rtmp-module and a nodejs app that receives callbacks in a test VM
#!/bin/bash -x
export nginx_version=1.9.9
# get latest rtmp mod
mkdir /usr/local/src
cd /usr/local/src
git clone git://github.com/arut/nginx-rtmp-module.git
# get nginx
wget http://nginx.org/download/nginx-${nginx_version}.tar.gz
@rmuslimov
rmuslimov / dired-features.el
Last active February 15, 2016 03:22
Small extension for dired under Macosx
(setq
scripts-dired-find-owner
"tell application \"Finder\"
set appname to (default application of (info for POSIX file \"%s\"))
do shell script \"echo \" & appname
end tell")
(setq
scripts-dired-open-from-finder
@siers
siers / nap.rb
Last active January 10, 2025 20:54
a more natural alarm clock command line interface
#!/usr/bin/env ruby
require 'time'
def die(str)
$stderr.puts str
exit
end
def usage
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@cmahns
cmahns / otrdm.md
Last active September 24, 2024 14:40
HOWTO: Twitter DM with OTR

Twitter DM + OTR: A quick and dirty tutorial

With the recent removal of the 140-character limit in Direct Messages by Twitter, DM's have now become a much more useful platform for communicating between individuals and groups. Sadly, DM's are still sent in plaintext between users and Twitter has no plans currently on encrypting these messages, at least as of August 2015. Since these are stored in plaintext at rest, an adversary can see the content of the message you are sending, which the two parties might not wish to happen. Fortunately as a few applications with basic Twitter support which also have excellent support for OTR, all hope isn't lo

#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@jamescmartinez
jamescmartinez / slack_delete.rb
Last active March 14, 2025 19:45
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,