Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 02:31
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@parmentf
parmentf / GitCommitEmoji.md
Last active May 5, 2024 13:32
Git Commit message Emoji
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@wiverson
wiverson / NotificationExample.java
Last active December 7, 2023 15:31
Starting point for implementing system native notifications with JavaFX.
package com.doublerobot;
import javafx.application.Platform;
import javafx.scene.control.Label;
import java.awt.*;
import java.awt.desktop.AppForegroundEvent;
import java.awt.desktop.AppForegroundListener;
import java.awt.event.ActionEvent;
@MicahElliott
MicahElliott / .Xdefaults
Created November 28, 2010 03:53
Xterm color scheme
! xterm color scheme — Make all 16 beautiful.
!
! Suited for black background, but includes disabled alternative light scheme.
!
! Open this file with gvim to enable <Leader><F2> color mode.
!
! Use `xfontsel`, `xlsfonts`, and `fc-list` to find other fonts.
!
! On Ubuntu I have to name this file ‘~/.Xdefaults-$(hostname)’
!
@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@prestancedesign
prestancedesign / web.clj
Last active August 24, 2023 15:45
Ring session authentication with Reitit
(ns authexample.web
(:gen-class)
(:require [buddy.auth :refer [authenticated? throw-unauthorized]]
[buddy.auth.backends.session :refer [session-backend]]
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
[clojure.java.io :as io]
[compojure.response :refer [render]]
[reitit.ring :as ring]
[ring.adapter.jetty :as jetty]
[ring.middleware.params :refer [wrap-params]]
@MicahElliott
MicahElliott / dir_colors
Created November 29, 2010 06:18
Fine-tune your dircolors for unique colorings of any file type.
# .dircolors
#
# Configure your console file colors.
#
# Author: Micah Elliott http://MicahElliott.com
#
# This file should sit in your $HOME as .dircolors or .dir_colors,
# depending on your distro.
#
# Configuration file for dircolors, a utility to help you set the
@muammar
muammar / getFirafonts.sh
Created May 23, 2016 08:41
Download and install Fira fonts in Linux or Mac OS X
#!/bin/bash
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html
cd /tmp
# install unzip just in case the user doesn't already have it.
if [[ `uname` = Linux ]]; then
sudo apt-get install unzip -y
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip"
@joelittlejohn
joelittlejohn / test.clj
Last active July 3, 2023 21:08
Dynamically generate clojure.test deftests (and other tricks)
(ns dynamic.test
(:require [clojure.test :refer :all]))
;; This example shows how tests can be generated dynamically, by
;; creating new vars with the correct metadata.
(defn add-test
"Add a test to the given namespace. The body of the test is given as
the thunk test-fn. Useful for adding dynamically generated deftests."
[name ns test-fn & [metadata]]