Skip to content

Instantly share code, notes, and snippets.

View MikeiLL's full-sized avatar

Mike iLL Kilmer MikeiLL

View GitHub Profile
@MikeiLL
MikeiLL / gist:cfc26649751cf0336d51e3debd58b2c6
Created October 8, 2016 15:20
Bootstrap FormValidation Domain Name or IP address
$('#domainName').formValidation({
framework: 'bootstrap',
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
ip: {
validators: {
#as per http://hackercodex.com/guide/python-development-environment-on-mac-osx/
# pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=false
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
gpip(){
PIP_REQUIRE_VIRTUALENV="" pip "$@"
}
# In case there's anything in there we need:
@MikeiLL
MikeiLL / SassMeister-input.scss
Created June 14, 2016 04:12 — forked from KittyGiraudel/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
/// Convert angle
/// @author Chris Eppstein
/// @param {Number} $value - Value to convert
/// @param {String} $unit - Unit to convert to
/// @return {Number} Converted angle
INFO global: Vagrant version: 1.8.1
INFO global: Ruby version: 2.2.3
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant"
INFO global: VAGRANT_OLD_ENV_CLICOLOR="1"
INFO global: VAGRANT_OLD_ENV_USER="mikekilmer"
INFO global: VAGRANT_OLD_ENV_ECHO_NEST_API_KEY="xxx"
INFO global: VAGRANT_OLD_ENV_OLDPWD="/Users/mikekilmer/Documents/Clients/UsFoodCoop/OpenFoodNetwork/openfoodnetwork"
INFO global: VAGRANT_OLD_ENV___CF_USER_TEXT_ENCODING="0x1F5:0:0"
INFO global: VAGRANT_OLD_ENV_VIRTUALENVWRAPPER_HOOK_DIR="/Users/mikekilmer/Envs"
server {
listen 80;
server_name domain.com ;
access_log /srv/www/domain.com/logs/access.log;
error_log /srv/www/domain.com/logs/error.log;
root /srv/www/domain.com/current/web;
index index.php index.htm index.html;
upstream unicorn {
server unix:/home/openfoodnetwork/apps/openfoodnetwork/shared/sock/unicorn.openfoodnetwork.sock fail_timeout=0;
}
server {
listen 80;
server_name staging.usfoodcoop.org usfoodcoop.org;
# Do not use a /tmp folder or other users can obtain certificates.
location '/.well-known/acme-challenge' {
@MikeiLL
MikeiLL / generateplaylist.py
Created February 2, 2016 03:39
Quodlibet Plugin to generate playlists based on tracks played through end, per day.
'''
This plugin creates a playlist of all the tracks that have played through the end on any given day.
TODO: Add an enable disable button in GUI?
'''
from quodlibet.plugins.events import EventPlugin
import time
import os
from os.path import expanduser
<?php
/*
Plugin Name: Disable Event Espresso
Plugin URI: http://www.mzoo.org
Description: Disables event espresso plugin files from calls to all but specified pages
Author: mZoo/Mike iLL
Version: 1.0
Author URI: http://www.mzoo.org
*/
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName localhost
ServerAlias *.localhost
VirtualDocumentRoot /Users/mikekilmer/Sites/%0
php_admin_value auto_prepend_file /Applications/MAMP/conf/apache/extra/setdocroot.php
# content of above file
# $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);
RewriteLogLevel 3
RewriteLog "/Applications/MAMP/logs/rewrite.log"
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
#recommended by rvm installer:
source ~/.profile
# [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# do i need to add this: