Skip to content

Instantly share code, notes, and snippets.

View jordan8037310's full-sized avatar

Jordan Ryan jordan8037310

View GitHub Profile
<?php
/**
* @file
* local.settings.php (Drupal 6.x)
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom:
@jordan8037310
jordan8037310 / pageres-mogrify.sh
Created February 9, 2016 22:30 — forked from mazuhl/pageres-mogrify.sh
Get screenshots and resize/crop them
pageres 1024x768 < urls.txt ; mogrify -resize 474 -crop 474x501+0+0 *.png
# Go get screenshots from list in clipboard
# Once that's done, resize all the images
# and crop them
# And then optimise them: /Applications/ImageOptim.app/Contents/MacOS/ImageOptim *.png
@jordan8037310
jordan8037310 / launch.sh
Created February 9, 2016 22:31 — forked from genoma/launch.sh
Script to use pageres
#!/bin/bash
echo ""
echo -n "$(tput setaf 1)What script you'd like to launch? $(tput bold)[C = Cropped/N = Normal] $(tput sgr 0)"
read script
if [ "$script" = "n" ]; then
cat resolutions|pageres localhost:3000
else
cat resolutions|pageres localhost:3000 -c
@jordan8037310
jordan8037310 / parse_yaml.sh
Created October 26, 2016 05:37 — forked from pkuczynski/LICENSE
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}