Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
usage()
{
echo "Usage: dump <file|image|text> [file] [language]"
}
case $1 in
file)
URL=`curl -w %{redirect_url} -F "file=@$2" http://dump.bitcheese.net/upload-file?simple`
@ccschmitz
ccschmitz / ST2 Multiple Cursor Keybindings.md
Created August 11, 2012 18:33
Create keybindings for multiple cursors in Sublime Text

Create Multiple Cursors from the Keyboard in Sublime Text

The following keybindings will allow you to create multiple cursors (above or below the current cursor) with Command + Option + (Up|Down). On Windows it would be Control + Alt + (Up|Down).

{ "keys": ["super+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["super+alt+down"], "command": "select_lines", "args": {"forward": true} }
@AliMD
AliMD / gist:3344523
Created August 13, 2012 22:28
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@RogerDodger
RogerDodger / md2bbc.pl
Last active December 8, 2020 21:05
Converts Markdown to BBCode
#!/usr/bin/env perl
use strict;
use warnings;
use 5.01;
use Text::Markdown;
use Encode;
use HTML::Entities;
use Getopt::Long;
@alexlangberg
alexlangberg / dunstrc
Created May 27, 2015 22:19
Settings for dunst notifications. Colors from FlatStudio GTK theme (dark). Place in ~/.config/dunst/
[global]
font = Ubuntu 10
# Allow a small subset of html markup in notifications and formats:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
#!/bin/sh
usage()
{
echo "Usage:"
echo " dump <file|image|text> [file] [language]"
echo " dump [file]"
}
_type="$1"
@adamhotep
adamhotep / longopts2getopts.sh
Last active November 29, 2023 23:22
POSIX shell: support long options by converting them to short options
# a refinement of https://stackoverflow.com/a/5255468/519360
# see also my non-translating version at https://stackoverflow.com/a/28466267/519360
# translate long options to short
reset=true stopped=""
for opt in "$@"; do
if [ -n "$reset" ]; then
unset reset
set -- # reset the "$@" array so we can rebuild it
fi
@JPvRiel
JPvRiel / apt_pinning_priorities.md
Last active June 1, 2024 09:56
Apt package pinning and priorities
@nathanchrs
nathanchrs / set-proxy
Created February 23, 2017 12:52
Bash script to set proxy on Linux
#!/usr/bin/env bash
# Sets proxy settings.
# Run using `source` command. apt-get proxy settings requires sudo privileges.
# By nathanchrs.
# Configuration
# PROXY_HOST=""
# PROXY_USER=""
# PROXY_PASSWORD=""
@nathanchrs
nathanchrs / unset-proxy
Created February 23, 2017 12:53
Bash script to disable proxy on Linux set by set-proxy script.
#!/usr/bin/env bash
# Disables proxy settings set by set-proxy.
# By nathanchrs.
# Set environment variables
export http_proxy=
export HTTP_PROXY=
export https_proxy=