Skip to content

Instantly share code, notes, and snippets.

View smcelhinney's full-sized avatar

Stephen McElhinney smcelhinney

View GitHub Profile
@smcelhinney
smcelhinney / gist:11288301
Last active August 29, 2015 14:00
Recursive bash directory permissions for Apache vhosts.
dir=/home/somevhostdomain.com/htdocs/;
while true; do
# the exit case when we get to the top level directory /
if [ -z "$dir" -o "$dir" = "/" ]; then
break;
fi;
echo chmodding o+x $dir;
# make the directory exectuable (openable) by others
chmod o+x $dir;
# go 'up' a directory
@smcelhinney
smcelhinney / markdown.mst
Last active August 29, 2015 14:01
Node Markdown parser (uses Restify)
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 3 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/css/bootstrap.css" rel="stylesheet"
media="screen">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
@smcelhinney
smcelhinney / designer.html
Created September 13, 2014 21:26
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
#!/bin/bash
cat $1 | gawk 'BEGIN { FS = "," ; q="\""; OFS = q FS q; ORS = "\n" } match($0, /code=\"(.*)\"(.?)+defaultMessage=\"(.*)\"/, a) { $1 = $1; print q a[1], a[3] q}' >> $2
@smcelhinney
smcelhinney / ryanair-fe-dev
Last active May 1, 2017 20:08
ryanair-fe-dev
## Ryanair.com FE Developer Tests
Choose 1 of the following web apps below, build it and submit it to giovagnolif@ryanair.com with the subject "Developer Test Web App". ZIP files or public Github URLs will be accepted.
Provide any build commands or runtime requirements (webserver required, extra packages, environment variables) in an INSTALLATION.txt file at the root of the project. The goal is to have the application as easily deployable as possible.
### Cheap flight finder
Build a small web app using the live Ryanair API for cheap flight information. The web app should have at least the following components
* A form which allows a user to choose an origin, a destination, and a date period. The origins/destinations should be taken from a web service (see below).
@smcelhinney
smcelhinney / ryanair-fe-apps-test
Created December 2, 2014 17:12
ryanair-fe-dev
## Ryanair.com FE Developer Tests
Choose 1 of the following web apps below, build it and submit it to giovagnolif@ryanair.com with the subject "Developer Test Web App". ZIP files or public Github URLs will be accepted.
Provide any build commands or runtime requirements (webserver required, extra packages, environment variables) in an INSTALLATION.txt file at the root of the project. The goal is to have the application as easily deployable as possible.
You may use a responsive framework (Foundation, Bootstrap) if you like, but customising the CSS (or SASS) will get you extra kudos. You must use AngularJS as the Javascript framework.
### Cheap flight finder
@smcelhinney
smcelhinney / ra-dev-fe-test
Last active August 29, 2015 14:10
ra-fe-dev-test
## Ryanair.com FE Developer Tests
Choose 1 of the following web apps below, build it and submit it to giovagnolif@ryanair.com with the subject "Developer Test Web App". ZIP files or public Github URLs will be accepted.
Provide any build commands or runtime requirements (webserver required, extra packages, environment variables) in an INSTALLATION.txt file at the root of the project. The goal is to have the application as easily deployable as possible.
You may use a responsive framework (Foundation, Bootstrap) if you like, but customising the CSS (or SASS) will get you extra kudos. You must use AngularJS as the Javascript framework.
### Cheap flight finder
function clone(obj) {
let proto = Object.getPrototypeOf(obj);
return Object.assign(Object.create(proto), obj);
}
@smcelhinney
smcelhinney / git-stash-view
Created February 27, 2015 13:02
Git stash view shortcut
git stash list | awk -F: '{ print "\n\n\n\n"; print $0; print "\n\n"; system("git stash show -p " $1); }'
# Press Q to exit each stash
var
gulp = require('gulp'),
$$ = require('gulp-load-plugins')(),
del = require('del'),
fs = require('fs'),
runSequence = require('run-sequence'),
server = require('./server/index'),
merge = require('event-stream').merge,
stylish = require('jshint-stylish'),
LessPluginCleanCSS = require('less-plugin-clean-css'),