Skip to content

Instantly share code, notes, and snippets.

View codycodes's full-sized avatar
😀

Cody Gagnon codycodes

😀
  • Oshkosh Corporation
  • Seattle, WA
  • 19:01 (UTC -07:00)
View GitHub Profile
@lmarkus
lmarkus / README.MD
Last active April 16, 2025 15:18
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@tagplus5
tagplus5 / imageToText.gs
Created December 18, 2015 18:02
google apps script image to text ocr
function doGet(request) {
if (request.parameters.url != undefined && request.parameters.url != "") {
var imageBlob = UrlFetchApp.fetch(request.parameters.url).getBlob();
var resource = {
title: imageBlob.getName(),
mimeType: imageBlob.getContentType()
};
var options = {
ocr: true
};
@jonschlinkert
jonschlinkert / markdown-toc_repeated-headings.md
Created December 15, 2015 19:42
Example table of contents generated by markdown-toc, correctly links repeated headings.
@stuartleeks
stuartleeks / AzureHelpers.ps1
Created November 25, 2015 13:47
A set of functions/cmdlets to simplify working with the Azure PowerShell cmdlets
<#
# Helper function for other cmdlets
#>
function ParseOperationDuration($durationString){
# expected behaviour (should put in tests)
#(ParseOperationDuration "PT21.501S").ToString() # Timespan: 21.501 seconds
#(ParseOperationDuration "PT5M21.501S").ToString() # Timespan: 5 minutes 21.501 seconds
#(ParseOperationDuration "PT1H5M21.501S").ToString() # Timespan: 1 hour 5 minutes 21.501 seconds
#(ParseOperationDuration "PT 21.501S").ToString() # throws exception for unhandled format
@themeteorchef
themeteorchef / timezones
Created October 12, 2015 18:01 — forked from ykessler/timezones
JSON list of time zones (Based on Olson tz database)
[
{"group":"US (Common)",
"zones":[
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"},
{"value":"America/New_York","name":"New York (Eastern)"},
{"value":"America/Chicago","name":"Chicago (Central)"},
{"value":"America/Denver","name":"Denver (Mountain)"},
{"value":"America/Phoenix","name":"Phoenix (MST)"},
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"},
{"value":"America/Anchorage","name":"Anchorage (Alaska)"},
@squarism
squarism / iterm2.md
Last active April 19, 2025 04:46
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@etes
etes / pi_mount_usb.md
Last active March 5, 2025 01:30
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@mutewinter
mutewinter / Bluetooth Device Toggle.md
Created September 1, 2015 19:40
An Alfred workflow to toggle the connection to Bluetooth Devices by name.

Workflow icon Bluetooth Device Toggle

Alfred Workflow to toggle bluetooth devices. I use this workflow to toggle the connection to my Bluetooth Headphones.

Download Bluetooth Device Toggle

@jsomers
jsomers / a-wotd-custom-word-list.md
Last active September 20, 2024 09:17
How to use a custom word list with OS X's "Word of the Day" screensaver

OS X's "Word of the Day" screensaver is a great way to passively learn words:

But I've always thought that its word list kind of stunk—it was full of obscure words that I could never really see myself using. I'd prefer something like Norman Schur's 1000 Most Important Words. What if you could plug your own word list into the screensaver?

On a rather obscure comment thread, someone explained where you might find the word list that Apple uses to power the screensaver. It is at /System/Library/Graphics/Quartz\ Composer\ Plug-Ins/WOTD.plugin/Contents/Resources/NOAD_wotd_list.txt. The file looks like this:

m_en_us1282510	quinsy
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active March 24, 2025 20:20
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest