Skip to content

Instantly share code, notes, and snippets.

View melz's full-sized avatar

Melissa P. melz

  • Ontario, Canada
View GitHub Profile
@melz
melz / os_cleanup.sh
Created July 22, 2014 19:57
Run on Debian/Ubuntu/Knoppix to strip down to barebones install.
apt-get purge $(dpkg-query -Wf '${Package;-40}${Essential}${Priority}\n'|awk '$2 ~ /nooptional|noextra/ {print $1}'|grep -v -E 'anacron|busybox|initramfs-tools|insserv|klibc-utils|libklibc|libsemanage-common|libsemanage1|libustr-1.0-1|libuuid-perl|linux-base|linux-image')
@melz
melz / keybase.md
Created June 25, 2014 14:15
Keybase

Keybase proof

I hereby claim:

  • I am melz on github.
  • I am melz (https://keybase.io/melz) on keybase.
  • I have a public key whose fingerprint is 46B5 E847 8058 C0E0 159C AE4C 4EA0 6332 D24A 2FE8

To claim this, I am signing this object:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@melz
melz / recursively_chmod_directories.sh
Created March 5, 2014 17:17
Command to recursively change directory permissions to 755
find . -type d -exec chmod 755 {} +
@melz
melz / reset.css
Created December 8, 2013 12:59
Make all elements use padding and border as part of the block.
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.clearfix:after {
content: "";
display: table;
@melz
melz / break_link.css
Created November 18, 2013 20:52
Break up long links
@melz
melz / app.php
Created November 15, 2013 22:03 — forked from lucasmezencio/app.php
Swiftmailer + Twig + Silex app.
<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app = require __DIR__.'/bootstrap.php';
$app->match('/contact/', function(Request $request) use ($app) {
if ('POST' == $request->getMethod()) {
$data = array(
@melz
melz / check_disk_age.sh
Created November 15, 2013 21:26
Check for the age of the HD
smartctl -a /dev/sda | grep Power
@melz
melz / jquery_save_responses.js
Created June 18, 2013 17:41
jQuery: Save responses when the user has finished typing.
// For each input element, we will assign them a timer to avoid sending too many changes to the server at the same time.
var timeout = [];
$('.input-element').each(function() {
timeout[this.id] = null;
})
$('.input-textarea').on('input', function() {
clearTimeout(timeout[this.id]);
var response = $(this).val();
@melz
melz / install_apm.sh
Created June 18, 2013 17:21
Installs Apache2 with PHP (with common utils) and MySQL support
apt-get install libapache2-mod-php5 php5-mysql php5-gd php5-mcrypt php5-curl php-apc
a2enmod rewrite
a2enmod ssl