Skip to content

Instantly share code, notes, and snippets.

View michaelstephens's full-sized avatar

Michael Stephens michaelstephens

  • Procore Technology
  • United States
View GitHub Profile
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://raw.githubusercontent.com/mikestephens/slack-night-mode/master/black.css',
success: function(css) {
$("<style></style>").appendTo('head').html(css);
}
});
});
@michaelstephens
michaelstephens / asdf.sh
Created July 9, 2018 18:29
ASDF Start Script
function asdf() {
case $1 in
"start")
case $2 in
"psql"|"postgres")
pg_ctl -D `asdf where postgres $(asdf current postgres)`/data start > /dev/null 2>&1
echo "[STARTED] Postgres `asdf current postgres`"
;;
"redis"|"redis-server")
`asdf which redis`-server /usr/local/etc/redis.conf
var allParrots = document.querySelectorAll("[data-emoji-name]");
for(var i =0; i < allParrots.length; i++){
var d = allParrots[i];
if(d.dataset.emojiName.indexOf('parrot') !== -1) {
d.click();
$(".btn_danger").click();
}
}
#!/bin/bash
# This is a script that checks for encryption on your ssh key
# Its purpose is to verify the security of your keys
# It also will help you encrypt your current ssh key should you desire
while [[ ! -f $ssh_key ]]; do
echo -n "Enter the path to your private ssh key ($HOME/.ssh/id_rsa): "
read user_input
function atom-ude() {
if [[ $1 == /* ]]; then
atom $UDE_PATH$1;
else
local pth="$(find $UDE_PATH -depth -maxdepth 2 -name "*$1*")"
if [ -z "$pth" ]; then
echo "$1 not found.";
else
echo "Please choose an option:";
COUNTER=0
export UDE_PATH=/path/to/your/ude
function atom-ude() {
local pth="$(find $UDE_PATH -depth -maxdepth 2 -name "*$1*" | head -n 1)"
if [ -z "$pth" ]; then
echo "$1 not found.";
else
echo "Found: $pth"
atom $pth
fi
adduser [PSQL USER]
sudo -u postgres -i
psql
# OR
psql postgres
CREATE USER [PSQL USER] WITH PASSWORD '[PASSWORD]';
CREATE DATABASE [PSQL DB];
GRANT ALL PRIVILEGES ON DATABASE [PSQL DB] to [PSQL USER];
\q
@michaelstephens
michaelstephens / .vimrc
Created April 10, 2015 15:32
My .vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
execute pathogen#infect()
cmap w!! %sudo tee > /dev/null %
filetype plugin indent on
syntax on
<link rel="import" href="../core-tooltip/core-tooltip.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
@michaelstephens
michaelstephens / atlassian_red.css
Created September 17, 2013 18:46
Atlassian Red style for Stylish
/* Atlassian - App Services Non Sprint Work */
.ghx-column,.ghx-columns .ghx-column{background:#e9e9e9;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-cell;list-style:none;margin:0;padding:0;position:relative;vertical-align:top;}.ghx-column-headers .ghx-column.ghx-busted-max,.ghx-columns .ghx-column.ghx-busted-max{background:#7C0000;}
/* Atlassian - Navbar*/
.aui-header{background:#812020;}
/* Atlassian - Navbar Hover */
.aui-header .aui-dropdown2-trigger{color:#ffffff;}.aui-header .aui-dropdown2-trigger:hover,.aui-header .aui-dropdown2-trigger:focus,.aui-header .aui-dropdown2-trigger.active{background-color:#A32929;color:#f0f0f0;}.aui-header .aui-dropdown2-trigger:hover .aui-icon-dropdown,.aui-header .aui-dropdown2-trigger:focus .aui-icon-dropdown,.aui-header .aui-dropdown2-trigger.active .aui-icon-dropdown,.aui-header .aui-dropdown2-trigger:hover::after,.aui-header .aui-dropdown2-trigger:focus::after,.aui-header .aui-dropdown2-trigger.active::after{border-top-c