Skip to content

Instantly share code, notes, and snippets.

Avatar

Jean Ragouin jrean

View GitHub Profile
@jrean
jrean / ponysay_motd.md
Created Jul 27, 2017 — forked from Tschrock/ponysay_motd.md
A ponysay MOTD for Ubuntu 16.04
View ponysay_motd.md

A ponysay MOTD for Ubuntu 16.04

Screenshot

  1. Install ponysay: (You may have to sudo apt install software-properties-common first)
    • sudo add-apt-repository ppa:vincent-c/ponysay
    • sudo apt-get update
    • sudo apt-get install ponysay
View html-audio-player-jquery
// Metadata Loaded Event
$("#audio-player").bind("loadedmetadata", function(e) {
...
});
@jrean
jrean / extract_unit
Created May 5, 2015
Extract content inside delimiters
View extract_unit
/**
* Extract content inside delimiters.
*
* @param string $start
* @param string $end
* @return string Extracted content.
*
* @source
* http://www.bitrepository.com/extract-content-between-two-delimiters-with-php.html
*/
View foo_bar_baz.php
$app->bind('Acme\Project\Foo', 'Bar\Foo');
View filters.php
<?php
/*
* An improvised Gist from
* https://gist.github.com/zmsaunders/5619519
* https://gist.github.com/garagesocial/6059962
*/
App::after(function($request, $response)
{
if(App::Environment() != 'local')
View validators.php
<?php
/* app/validators.php */
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
/*
View .zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Example aliases