Skip to content

Instantly share code, notes, and snippets.

View jrean's full-sized avatar

Jean R. jrean

  • Earth
View GitHub Profile
@Tschrock
Tschrock / ponysay_motd.md
Last active December 5, 2019 21:28
A ponysay MOTD for Ubuntu 16.04

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
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@rponte
rponte / get-latest-tag-on-git.sh
Last active March 11, 2024 07:50
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@devillom
devillom / lists.blade.php
Last active August 29, 2015 14:15
Custom Laravel 5 pagination
<!--view/post/lists-->
@include('pagination.uikit',['paginator'=>$posts])
@allaniftrue
allaniftrue / filters.php
Last active March 16, 2019 19:00
Laravel Minify HTML response
<?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')
@elena-kolevska
elena-kolevska / validators.php
Last active June 24, 2021 14:44
Custom alphabetic validator that allows spaces
<?php
/* app/validators.php */
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
/*