Skip to content

Instantly share code, notes, and snippets.

Avatar
🇮🇹
Life is good when you have a good sandwich

Claudio Ludovico ludo237

🇮🇹
Life is good when you have a good sandwich
View GitHub Profile
@ludo237
ludo237 / prune-branches.sh
Created Sep 6, 2018
Delete all branches but keep master
View prune-branches.sh
git branch | grep -v "master" | xargs git branch -D
@ludo237
ludo237 / fix.txt
Created Aug 23, 2018
Make WSL and PHP working with Visual Studio Code on Windows 10+
View fix.txt
https://github.com/Microsoft/vscode/issues/22391#issuecomment-317482983
@ludo237
ludo237 / Assertions.php
Created Mar 7, 2018
Laravel PHP custom assertions
View Assertions.php
<?php
namespace Tests\Utils;
use Ramsey\Uuid\Uuid;
/**
* Trait Assertions
* @package Tests\Utils
*/
@ludo237
ludo237 / roundForHumans.php
Last active Apr 6, 2017
Round numbers in order to have something more human readable
View roundForHumans.php
<?php
/**
* Round a number into an human readable number
*
* The idea is to converts numbers like 999,999 into something like 0.9M or 999.99K
* using the scientific notation.
*
* @param $number
*
* @return string
View keybase.md

Keybase proof

I hereby claim:

  • I am ludo237 on github.
  • I am ludo237 (https://keybase.io/ludo237) on keybase.
  • I have a public key whose fingerprint is 2125 E111 3D03 F401 73CD 1FE5 2549 0AA0 C338 B80C

To claim this, I am signing this object:

@ludo237
ludo237 / installnode.sh
Created Oct 27, 2016
Install NodeJs on WSL
View installnode.sh
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
@ludo237
ludo237 / installcomposer.php
Created Oct 17, 2016
Installing Composer via PHP
View installcomposer.php
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
@ludo237
ludo237 / wslps.ps1
Created Oct 11, 2016
Enable WSL using Poweshell
View wslps.ps1
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
@ludo237
ludo237 / init-tests.sh
Created Jul 4, 2016
Simple bash that allows to autorun a test suite for Laravel
View init-tests.sh
#!/bin/bash
clear
echo "---------------------------------"
echo "---- Automatic Tester -----"
echo "---- -----"
echo "---- v1.4 -----"
echo "---------------------------------"
echo "==> Testing if PHP is on Version 7.0+..."
@ludo237
ludo237 / happybday.sh
Created Apr 15, 2016
Automate Happy B. Day
View happybday.sh
sh /home/YourUser/saints.sh | mutt -s "Happy Birthday! <3" email@example.com