Skip to content

Instantly share code, notes, and snippets.

View jmillerdesign's full-sized avatar

J. Miller jmillerdesign

View GitHub Profile
@latompa
latompa / find duplicate records
Created October 30, 2009 02:29
find duplicate records
SELECT name,
COUNT(name)
FROM users
GROUP BY name
HAVING ( COUNT(name) > 1 )
@aegypius
aegypius / base62.php
Created April 30, 2010 12:36 — forked from rduarte/base62.php
Base62 Encoding/Decoding
<?php
function base62_encode($num){
$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$base = 62;
$result = '';
while($num >= $base) {
$r = $num%$base;
$result = $chars[$r].$result;
$num = $num/$base;
@betawax
betawax / gist:794975
Last active September 24, 2015 19:07
Recursively adjust permissions for files and directories
find * -type f -exec chmod 644 {} \;
find * -type d -exec chmod 755 {} \;
@samuel
samuel / check_redis.py
Last active October 19, 2019 11:16
Redis health and memory check for Nagios
#!/usr/bin/python
#
# LICENSE: MIT
#
# Copyright (C) 2014 Samuel Stauffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation
mkdir -p /Users/$USER/Applications/DropboxAltStarter.app/Contents/MacOS/
cat <<EOF >/Users/$USER/Applications/DropboxAltStarter.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleExecutable</key>
@getsource
getsource / WP_Bag_of_Tricks.txt
Created October 26, 2011 21:07 — forked from boogah/WP_Bag_of_Tricks.txt
Things I've learned by being DreamHost's resident WordPress nerd.
WP Bag of Tricks
1. Helpful Scripts/Plugins:
Hacks:
http://wordpress.org/extend/plugins/tac/
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.)
http://wordpress.org/extend/plugins/wp-malwatch/
@Domw
Domw / Lorem ipsum
Created January 13, 2012 11:25
lorem ipsum sample
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sodales tellus ut dolor pharetra ornare. Ut felis urna, aliquam suscipit adipiscing sit amet, lobortis non urna. Quisque vulputate convallis magna vel commodo. Pellentesque nec nisl tortor. Etiam et posuere arcu. Pellentesque augue arcu, fermentum ut consectetur non, rhoncus ut erat. Nulla facilisi. Duis purus purus, malesuada ut aliquet nec, feugiat sit amet odio. Sed gravida tincidunt lacus, vel semper leo dapibus vel.
Pellentesque placerat, lectus ac congue ornare, velit mauris tempus metus, vel sollicitudin neque justo vel libero. Cras placerat, ipsum at sagittis lacinia, nunc augue sagittis mi, ut consectetur sapien nisi ac sapien. Donec arcu diam, suscipit vel venenatis vitae, vehicula semper odio. Fusce porta magna tristique leo malesuada faucibus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas at ligula eget dui hendrerit interdum. Etiam commodo fermentum tortor, in congue diam consect
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@a1phanumeric
a1phanumeric / gist:2308893
Created April 5, 2012 08:04
How to sort by average user rating correctly
SELECT widget_id, ((positive + 1.9208) / (positive + negative) - 1.96 * SQRT((positive * negative) / (positive + negative) + 0.9604) / (positive + negative)) / (1 + 3.8416 / (positive + negative)) AS ci_lower_bound FROM widgets ORDER BY ci_lower_bound DESC;
@mjburgess
mjburgess / BreakingIntoWebDev.markdown
Created July 14, 2012 19:25
Breaking into Web Dev

Breaking into Web Development

I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).

To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential). To learn these technologies you should use several in combination on on