Skip to content

Instantly share code, notes, and snippets.

View dprevite's full-sized avatar
🐈

Dan Previte dprevite

🐈
View GitHub Profile
@dprevite
dprevite / stand-up.html
Created April 5, 2023 15:30
Shuffle team member names so every day stand up is just a little different
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shuffle Names</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.16/dist/tailwind.min.css" rel="stylesheet">
<style>
.big { font-size: 2rem; }
.unselectable {
.expando-button, .thing .expando-button.image, .thing div.expando-button, .thing div.expando-button.collapsed {
margin: 2px 5px 2px 0;
height: 23px!important;
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zd…gxPSIxNi41IiB5MT0iMTguNzUiIHgyPSIyMSIgeTI9IjE4Ljc1IiAvPgoJPC9nPgo8L3N2Zz4=);
}
@dprevite
dprevite / setup.md
Last active June 2, 2017 18:20
new homestead mailcatcher

First, Install rbenv

  1. git clone https://github.com/rbenv/rbenv.git ~/.rbenv
  2. Add the following to your .bashrc or .zshrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
  1. Run source ~/.zshrc or source ~/.bashrc
  2. git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
@dprevite
dprevite / osx-for-hackers.sh
Last active November 28, 2016 05:43 — forked from brandonb927/osx-for-hackers.sh
My fork of osx-for-hackers.sh
#!/bin/sh
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Set the colours you can use
black='\033[0;30m'
@dprevite
dprevite / .vimrc
Last active December 27, 2015 08:29 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@dprevite
dprevite / checkout_all_branch_to_dirs.php
Last active December 15, 2015 16:08
Pulls all feature branches to their own folders so they can be served by the web server for easy QA. These are run via cron. *.branches.projectdomain.com
#!/usr/bin/php
<?php
// Constants we need to do things
define('WEB_ROOT', '/var/www/branches.projectdomain.com/'); // Requires trailing slash!
define('GIT', '/usr/bin/git');
define('GIT_REPO', WEB_ROOT . '__base__/'); // Requires trailing slash!
define('GIT_DIR', GIT_REPO . '.git');
define('GIT_CMD', GIT . ' --git-dir=' . GIT_DIR . ' ');
@dprevite
dprevite / install-comodo-ssl-cert-for-nginx.rst
Created October 24, 2015 18:45 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@dprevite
dprevite / gist:3702510
Created September 11, 2012 22:11 — forked from brianseitel/gist:1495488
SimpleXML to Array
function simplexml_to_array($simplexml_object) {
$array = array();
$children = $simplexml_object->children();
$executed = false;
foreach ($children as $elementName => $node) {
if ($array[$elementName] != null) {
if ($array[$elementName][0] !== null) {
$i = count($array[$elementName]);
simplexml_to_array($node, $array[$elementName][$i]);
} else {
@dprevite
dprevite / flash_message_helper.php
Created August 9, 2012 17:59
flash_message_helper.php
<?php
/**
* Set a flash message to be displayed
*
* @param string $type The type of message, used for styling (error|success|warning|information)
* @param string $message The message to be displayed
*
* @return void
@dprevite
dprevite / jenkins.css
Created June 21, 2012 18:52
Jenkins CSS
@charset "utf-8";
#main-table {
background-image: none !important;
}