Skip to content

Instantly share code, notes, and snippets.

View djekl's full-sized avatar
:octocat:
Working from home

Alan Wynn djekl

:octocat:
Working from home
View GitHub Profile
# Tail Laravel and Webserver (NGINX & Apache 2) log files
# Compatible with Laravel 4 & 5
#
alias tl="ls -d /var/log/nginx/* /var/log/apache2/* storage/logs/* app/storage/logs/* storage/laravel.log | grep -v 'gz$' | grep -v '1$' | xargs tail -f"
@djekl
djekl / imap-attachment.php
Created October 6, 2015 17:49 — forked from hakre/imap-attachment.php
Save attachments from imap messages to disk.
<?php
/**
* imap-attachment.php
*
* @author hakre <hakre.wordpress.com>
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php
*/
/**
* Utility Class
@djekl
djekl / festify-add-tracks.sh
Last active November 24, 2015 09:09
Add a list of songs to a festify party - http://festify.us/564116903d5cde011759591c
#!/usr/bin/env bash
party_id="564116903d5cde011759591c"
track_id="0a8uknDuoiWLuACnaLPlgr"
# curl -s "http://festify.us/api/parties/${party_id}/queue" -H "Content-Type: application/json;charset=UTF-8" --data-binary "{\"name\":\"hey\",\"spotifyID\":\"${track_id}\"}" --compressed
# example here
curl -s "http://festify.us/api/parties/${party_id}/queue" -H "Content-Type: application/json;charset=UTF-8" --data-binary '{"name":"hey","spotifyID":"0a8uknDuoiWLuACnaLPlgr"}' --compressed
printf "\n"
@djekl
djekl / Blue Marble.markdown
Last active December 8, 2015 09:30
Blue Marble
@djekl
djekl / number-format.js
Created February 9, 2016 09:04
Extend the default Number object with a formatMoney() method
// Extend the default Number object with a formatMoney() method:
// usage: someVar.formatMoney(symbol, decimalPlaces, thousandsSeparator, decimalSeparator)
// defaults: ('£', 2, ',', '.')
Number.prototype.formatMoney = function(symbol, places, thousand, decimal) {
symbol = symbol !== undefined ? symbol : '£';
places = !isNaN(places = Math.abs(places)) ? places : 2;
thousand = thousand || ',';
decimal = decimal || '.';
var number = this,
@djekl
djekl / auth-basic.conf
Created March 7, 2016 21:43 — forked from Thermionix/auth-basic.conf
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@djekl
djekl / CSS Xbox One Achievement.markdown
Last active December 14, 2019 13:39
CSS Xbox One Achievement

CSS Xbox One Achievement

As an avid Xbox Gamer and always wanting to push myself, I decided to recreate the Xbox One Achievement Toast. ou can see a video example of it here - https://www.youtube.com/watch?v=CgwkK2uUk1c&feature=youtu.be

All I need to do now, is play this to make it complete - (Achievement Notification Sound) http://majornelson.com/2011/10/07/download-the-achievement-unlocked-sound/

Here is an example of the old 360 one - http://codepen.io/jesseGlacken/details/uwtsx/

A Pen by Alan Wynn on CodePen.

@djekl
djekl / animations.css
Created April 9, 2016 19:21
SVG2CSS : output files
@keyframes dropball {
0% {
bottom: 200px;
}
2% {
bottom: 198.89046144485474px;
left: 2.000002145767212px;
}
4% {
bottom: 197.5577425956726px;
@djekl
djekl / animations.css
Created April 9, 2016 19:21
SVG2CSS : output files
@keyframes dropball {
0% {
bottom: 200px;
}
2% {
bottom: 198.89046144485474px;
left: 2.000002145767212px;
}
4% {
bottom: 197.5577425956726px;
@djekl
djekl / falsehoods.md
Created April 17, 2016 07:25 — forked from wboykinm/falsehoods.md
Falsehoods programmers believe about addresses - by Michael Tandy

Falsehoods programmers believe about addresses

This is an anchor-linked version of the excellent, amazing original opus magnum by Michael Tandy.

An address will start with, or at least include, a building number.

Counterexample: Royal Opera House, Covent Garden, London, WC2E 9DD, United Kingdom.

When there is a building number, it will be all-numeric.

Counterexample: 1A Egmont Road, Middlesbrough, TS4 2HT