Skip to content

Instantly share code, notes, and snippets.

@djhaskin987
djhaskin987 / png2icns
Created December 21, 2016 19:19
Convert PNG file to ICNS file
# Stolen from here: http://stackoverflow.com/a/20703594/850326
#!/bin/sh
export POSIXLY_CORRECT=1
if [ -z "${1}" -o -z "${2}" ]
then
echo "Usage: ${0} <name> <original-png-location>"
fi
name=$1
@Zehkul
Zehkul / Convert Script – README.md
Last active December 16, 2023 07:19
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@rlemon
rlemon / chat-youtube-fix.user.js
Last active December 31, 2015 01:38
SE Chat Inline YouTube UserScript - Replaces the new window youtube links with inline videos
// ==UserScript==
// @name SE Chat Inline YouTube
// @author Robert Lemon
// @version 0.1
// @namespace http://rlemon.ca
// @description Replaces the new window youtube links with inline videos
// @include http://chat.stackexchange.com/rooms/*
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
function EmbedCodeOnPage(type, kode) {
@tmeissner
tmeissner / avr_fifo.c
Last active March 13, 2022 02:42
Fifo implementation for AVR 8-bit controller
struct fifo {
uint8_t size; /* size of buffer in bytes */
uint8_t read; /* read pointer */
uint8_t write; /* write pointer */
unsigned char buffer[]; /* fifo ring buffer */
};
/* define a FIFO type for 'size' bytes */
#define MK_FIFO(size) \
struct fifo_ ## size { \
@lmullen
lmullen / gist:3767386
Created September 22, 2012 18:50
Make all markdown files in directory into PDFs
# Produce PDFs from all Markdown files in a directory
# Lincoln Mullen | http://lincolnmullen.com | lincoln@lincolnmullen.com
# List files to be made by finding all *.md files and appending .pdf
PDFS := $(patsubst %.md,%.md.pdf,$(wildcard *.md))
# The all rule makes all the PDF files listed
all : $(PDFS)
# This generic rule accepts PDF targets with corresponding Markdown
@agnoster
agnoster / README.md
Last active July 13, 2024 19:26
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@Dayjo
Dayjo / Default (OSX).sublime-keymap -- User
Created July 17, 2012 09:25 — forked from coldnebo/Default (OSX).sublime-keymap -- User
Sublime Text 2 fix for OSX home/end keys
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } }
@coldnebo
coldnebo / Default (OSX).sublime-keymap -- User
Created February 3, 2012 16:21
Sublime Text 2 fix for OSX home/end keys
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@stchris
stchris / getimg.py
Created February 19, 2011 13:34
Improved version of getimg.sh - gets the 'image of the day' from NASA, writes the summary onto the image and sets it as the Gnome wallpaper.
#!/usr/bin/env python
"""
getimg.py
Gets the current image of the day from NASA and sets it as the
background in Gnome. The summary / description text is written
to the image.
Requires:
PIL (apt-get install python-imaging or pip install PIL)