Skip to content

Instantly share code, notes, and snippets.

View cassidyjames's full-sized avatar

Cassidy James Blaede cassidyjames

View GitHub Profile
@LeviSnoot
LeviSnoot / discord-timestamps.md
Last active April 21, 2026 20:02
Discord Timestamp Syntax

Discord Timestamps

Discord timestamps can be useful for specifying a date/time across multiple users time zones. They work with the Unix Timestamp format and can be posted by regular users as well as bots and applications.

The Epoch Unix Time Stamp Converter is a good way to quickly generate a timestamp. For the examples below I will be using the Time Stamp of 1543392060, which represents November 28th, 2018 at 09:01:00 hours for my local time zone (GMT+0100 Central European Standard Time).

Formatting

Style Input Output (12-hour clock) Output (24-hour clock)
Default <t:1543392060> November 28, 2018 9:01 AM 28 November 2018 09:01
@cookandy
cookandy / lastfm-to-slack.sh
Last active May 1, 2025 18:56
last.fm to Slack
#!/bin/bash
# this script updates your slack status with the current playing track from last.fm
# requires URI::Escape perl module (cpan URI::Escape) and jq
# make sure to update slack_api_key, last_fm_api_key, and last_fm_username
#########################################
##### to run this script at startup #####
#########################################
# save this script to /Users/<your_user>/Library/scripts/lastfm-to-slack.sh
@IanColdwater
IanColdwater / twittermute.txt
Last active March 8, 2026 00:11
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@abock
abock / dontdoit.c
Created August 10, 2018 15:45
DO NOT EDIT
// ██████╗ ██╗ ███████╗ █████╗ ███████╗███████╗ ██████╗ ██████╗ ███╗ ██╗ ██████╗ ████████╗ ███████╗██████╗ ██╗████████╗
// ██╔══██╗██║ ██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔══██╗██╔═══██╗ ████╗ ██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██║╚══██╔══╝
// ██████╔╝██║ █████╗ ███████║███████╗█████╗ ██║ ██║██║ ██║ ██╔██╗ ██║██║ ██║ ██║ █████╗ ██║ ██║██║ ██║
// ██╔═══╝ ██║ ██╔══╝ ██╔══██║╚════██║██╔══╝ ██║ ██║██║ ██║ ██║╚██╗██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║
// ██║ ███████╗███████╗██║ ██║███████║███████╗ ██████╔╝╚██████╔╝ ██║ ╚████║╚██████╔╝ ██║ ███████╗██████╔╝██║ ██║
// ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝
//
// █████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ███████╗███╗ ██╗███████╗██████╗ █████╗ ████████╗███████╗██████╗ ██████
require 'zlib'
require 'yaml'
require "uri"
require "open-uri"
# HTTPS doesn't work
componentsDataGz = open("http://packages.elementary.io/appcenter/dists/xenial/main/dep11/Components-amd64.yml.gz")
componentsData = Zlib::GzipReader.new( componentsDataGz ).read
template = '---
@joewiz
joewiz / post-mortem.md
Last active October 16, 2024 07:39
Recovery from nginx "Too many open files" error on Amazon AWS Linux

On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:

2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)

2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...

An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.

  1. * Instead of using su to run ulimit on the nginx account, use ps aux | grep nginx to locate nginx's process IDs. Then query each process's file handle limits using cat /proc/pid/limits (where pid is the process id retrieved from ps). (Note: sudo may be necessary on your system for the cat command here, depending on your system.)
  2. Added fs.file-max = 70000 to /etc/sysctl.conf
@brpowell
brpowell / romsync.py
Last active March 28, 2023 23:40
Dropbox ROM syncing
# - write token and cursor to .romsync
# * update cursor every delta check
# * config file format
# token=token_string
# cursor=cursor_string
# db_roms=path_to_dropbox_roms
# local_roms=path_to_local_roms
# * upload new config to dropbox
import os
@sugarmo
sugarmo / embed-github-things.md
Last active January 11, 2024 03:44
Embed Github Things (geoJSON, 3D model)

Embedding your geoJSON map elsewhere

<script src="https://embed.github.com/view/geojson/<username>/<repo>/<ref>/<path_to_file>"></script>

Embedding your 3D model elsewhere

@banaslee
banaslee / XGH - de-de.txt
Last active May 4, 2026 03:55
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Quelle: http://gohorseprocess.wordpress.com
Übersetzung ursprünglich von https://gist.github.com/Neffez/f8d907ba8289f14e23f3855011fa4e2f
1. Ich denke, also ist es nicht XGH.
In XGH wird nicht gedacht, es wird das erste gemacht, was in den Sinn kommt. Es gibt auch keine zweite Option, die erste ist schneller.
2. Es gibt 3 Wege ein Problem zu lösen: den richtigen Weg, den falschen Weg und den XGH Weg, welcher exakt wie der falsche ist, aber schneller.