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
@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 / 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
# 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"

SublimeText3 Valid License without cracking! Just download/install then use this license.

----- BEGIN LICENSE -----
Alexey Plutalov
Single User License
EA7E-860776
3DC19CC1 134CDF23 504DC871 2DE5CE55
585DC8A6 253BB0D9 637C87A2 D8D0BA85
AAE574AD BA7D6DA9 2B9773F2 324C5DEF
17830A4E FBCF9D1D 182406E9 F883EA87

Ubuntu 14.04+ 32bit (ubuntu-mate.org)

Simple steps for installing required tools after fresh Ubuntu install.
Or use installer and uninstaller scripts, they won't break anythng!!

Included

  • Licensed Sublime Text 3 (build 3065)
  • Nginx 1.6.2 (stable version)
  • PHP 5.6.3 (stable version)
  • NVM v0.20.0 (for Node.js and NPM)
Verifying that +djekl is my Bitcoin username. You can send me #bitcoin here: https://onename.io/djekl
@djekl
djekl / stripe_sub_wo_cc.php
Created July 30, 2014 20:06
Laravel Cashier Free Subscription w/o Credit Card Filter
<?php
Route::filter('stripe.plans.free', function() {
if (Auth::guest() || Auth::user()->subscribed()) {
return;
}
$user = Auth::user();
$chosenPlan = 'free';
<?php
namespace Acme\Html;
use Illuminate\Html\FormBuilder as IlluminateFormBuilder;
class FormBuilder extends IlluminateFormBuilder {
/**
* An array containing the currently opened form groups.
@djekl
djekl / sm-annotated.js
Created July 1, 2014 16:31 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
(function() {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
@djekl
djekl / valid_nhs_number.php
Created June 26, 2014 08:37
Simple function to check for a valid NHS number (with example usage)
<?php
// start with our test NHS number
$nhs_no = '401 023 2137';
function validNhsNumber($nhs_no)
{
// save the input number for the exception
$input_nhs_no = $nhs_no;