Skip to content

Instantly share code, notes, and snippets.

View wnstn's full-sized avatar

Winston Hearn wnstn

View GitHub Profile
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active December 12, 2023 17:47
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@ascot21
ascot21 / gist:5912215
Created July 2, 2013 19:16
Truncating text with CSS
.message {
@include span-columns(12);
font-size: 85%;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
@micahredding
micahredding / convert mysql from innodb to myisam
Created April 1, 2013 20:19
alter table cache engine = myisam; alter table cache_admin_menu engine = myisam; alter table cache_block engine = myisam; alter table cache_bootstrap engine = myisam; alter table cache_field engine = myisam; alter table cache_file_styles engine = myisam; alter table cache_filter engine = myisam; alter table cache_form engine = myisam; alter tabl…
convert mysql from innodb to myisam
@bval
bval / .htrouter.php
Created February 19, 2013 21:33
This is a router for Drupal and other PHP apps that rely on mod_rewrite rules for "clean URLs" so that those same apps can be run under PHP 5.4's built-in webserver which doesn't support mod_rewrite.
<?php
/**
* @file
* The router.php for clean-urls when use PHP 5.4.0 built in webserver.
*
* Usage:
*
* php -S localhost:3000 .htrouter.php
*
*/
@desandro
desandro / jquery-layout-review.md
Created January 28, 2013 18:13
layout thrashing in jQuery
$("a").filter(->
this.hostname && this.hostname != location.hostname
).addClass "external"