Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
kamilogorek / _screenshot.md
Last active May 2, 2024 13:48
Clutter-free VS Code Setup
image
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
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
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active April 16, 2024 10:42
Byte formatting for Google Sheets
@eddiekaiger
eddiekaiger / click.m
Last active April 30, 2024 15:19
Programmatically move/click mouse on macOS
// Found on: http://hints.macworld.com/article.php?story=2008051406323031
// File:
// click.m
//
// Compile with:
// gcc -o click click.m -framework ApplicationServices -framework Foundation
//
// Usage:
// ./click -x pixels -y pixels
@cannikin
cannikin / gist:abb686146972a6716764
Created June 22, 2015 22:56
Git pre-commit hook for Ruby/Javascript debugging statements
#!/bin/sh
FILES='(js|css|rb|haml|erb)'
FORBIDDEN='(binding.pry|console.|debugger)'
GREP_COLOR='4;5;37;41'
if [[ $(git diff --cached --name-only | grep -E $FILES) ]]; then
git diff --cached --name-only | grep -E $FILES | \
xargs grep --color --with-filename -n -E $FORBIDDEN && \
printf "\nLooks like you are trying to commit something you shouldn't. Please fix your diff, or run 'git commit --no-verify' to skip this check, if you must." && \
@nadar
nadar / PostMessageToSlackChannel.php
Last active May 3, 2024 10:40
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit:
*
* 1.) Create an APP -> https://api.slack.com/apps/
* 2.) See menu entry "Install App"
* 3.) Use the "Bot User OAuth Token"
@brianloveswords
brianloveswords / git-obliterate
Last active January 24, 2024 12:28
git-obliterate: for removing sensitive files you may have committed from the entire history of the project.
#!/bin/bash
file=$1
test -z $file && echo "file required." 1>&2 && exit 1
git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all
git ignore $file
git add .gitignore
git commit -m "Add $file to .gitignore"
@Yona-Appletree
Yona-Appletree / ws2811_bridge.ino
Created September 9, 2013 02:56
A simple Arduino program which uses Adafruit's NeoPixel library to relay serial-level RGB data to a series of WS2811-compatible LED modules attached to an output pin. The use of Adafurit's library requires double buffering in the serial-receive code, reducing the number of LEDs that can be driven with a single Arduino. It's possible that code co…
// include the neo pixel library
#include <Adafruit_NeoPixel.h>
// The number of LEDs being driven. This dictates how much data is expected in each frame read from the serial port.
static const int NUM_LEDS = 256;
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: