Skip to content

Instantly share code, notes, and snippets.

View BrianGilbert's full-sized avatar

Brian Gilbert BrianGilbert

View GitHub Profile
@Chandler
Chandler / slack_history.py
Last active March 27, 2025 01:16
Download Slack Channel/PrivateChannel/DirectMessage History
print("UPDATE AUG 2023: this script is beyond old and broken")
print("You may find interesting and more up to date resources in the comments of the gist")
exit()
from slacker import Slacker
import json
import argparse
import os
# This script finds all channels, private channels and direct messages
@josephholsten
josephholsten / sizeup.lua
Last active February 24, 2025 11:36
SizeUp in Hammerspoon
-- === sizeup ===
--
-- SizeUp emulation for hammerspoon
--
-- To use, you can tweak the key bindings and the margins
local sizeup = { }
--------------
-- Bindings --
@jeveloper
jeveloper / taiga-Vagrantfile
Last active August 29, 2015 14:08
Taiga Vagrantfile that works on OSX and others
# -*- mode: ruby -*-
# vi: set ft=ruby :
require "./source.rb"
ROOT_PATH = File.dirname(__FILE__)
VAGRANTFILE_API_VERSION = "2"
@clemens-tolboom
clemens-tolboom / tagAmsterdam2014.user.js
Last active August 29, 2015 14:07
Auto tag for DrupalCon Amsterdam2014
// ==UserScript==
// @name www.drupal.org
// @namespace tagAmsterdam2014
// @match https://www.drupal.org/node/*
// @run-at document-end
// @grant none
// ==/UserScript==
// SAVE as tagAmsterdam2014.user.js
// Inspired by https://github.com/webflo/drupalsprint-bookmarklet/blob/gh-pages/index.html
@rewonc
rewonc / app.js
Last active October 26, 2021 00:16
AngularJS/PhoneGap/Ionic: filter to convert links for opening in separate mobile window
//*
//* See the JS Fiddle: http://jsfiddle.net/sxcjmoj5/3/
//*
//*
// make sure ngSanitize module is installed:
// https://docs.angularjs.org/api/ngSanitize
//
// To convert links from plaintext, you must use the linky filter which is included with ngSanitize
// https://docs.angularjs.org/api/ngSanitize/filter/linky
//
@cmsj
cmsj / -
Created July 5, 2014 00:39
require "grid"
ext.grid.MARGINX = 0
ext.grid.MARGINY = 0
hydra.alert "Hail hydra!"
pathwatcher.new(os.getenv("HOME") .. "/.hydra/", hydra.reload):start()
autolaunch.set(true)
menu.show(function()
@valkum
valkum / aegir acl ownership fix
Created March 27, 2014 22:28
Simple Workaround for aegir problem with wrong ownership of uploaded files, e.g. files in files/js/* with ownership www-data
#!/usr/bin/env bash
#Setup as a root cronjob
for f in /var/aegir/platforms/*/sites/*;
do
if [ -d "$f" ]; then
if [ -d "$f/files" ]; then
chown aegir:aegir "$f/files" -R
fi;
if [ -d "$f/privates" ]; then
chown aegir:aegir "$f/privates" -R
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active March 20, 2025 17:17
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@kissgyorgy
kissgyorgy / osx_defaults.sh
Last active June 1, 2017 05:56
Change OS X defaults
# prevent the creation of .DS_Store files on network drives
# http://hints.macworld.com/article.php?story=2005070300463515
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
#---------------------------------------------------------------------
# Disable/enable Dashboard:
# http://hints.macworld.com/article.php?story=20050723123302403
defaults write com.apple.dashboard mcx-disabled -boolean YES
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active April 11, 2025 19:59
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
mkdir -p ~/.ssh
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs