Skip to content

Instantly share code, notes, and snippets.

View loranger's full-sized avatar

Laurent Goussard loranger

View GitHub Profile
@loranger
loranger / SQLiteDumper.php
Last active July 6, 2020 14:16
Convert SQLite dump file to MySQL dump
<?php
namespace App;
class SQLiteDumper extends \SQLite3
{
private $sql;
public function __construct(String $sqlite_path)
{
@loranger
loranger / unicons.sh
Created June 29, 2020 08:22
Get latest unicons release and convert svg as png
#!/usr/bin/env sh
rm -rf line
mkdir -p line
cd line
# Get latest release
echo "Finding latest release"
LOCATION=$(curl -s https://api.github.com/repos/Iconscout/unicons/releases/latest \
| grep "tag_name" \
@loranger
loranger / # imagemagick - 2019-01-14_17-12-26.txt
Created January 14, 2019 16:21
imagemagick on macOS 10.14.2 - Homebrew build logs
Homebrew build logs for imagemagick on macOS 10.14.2
Build date: 2019-01-14 17:12:26
@loranger
loranger / # imagemagick - 2019-01-14_17-12-26.txt
Created January 14, 2019 16:17
imagemagick on macOS 10.14.2 - Homebrew build logs
Homebrew build logs for imagemagick on macOS 10.14.2
Build date: 2019-01-14 17:12:26
@loranger
loranger / migrate_lang
Last active March 8, 2018 13:41
Migrate laravel language files to json
#!/usr/bin/env php
<?php
if ($argc <=1) {
echo "Please specify a project path:\n $argv[0] /path/to/laravel/project";
exit(1);
} elseif (!file_exists($argv[1])) {
echo "Please specify a valid project path:\n $argv[1] does not exists";
exit(1);
} elseif (!file_exists(sprintf('%s/composer.json', $argv[1])) || !property_exists((json_decode(file_get_contents(sprintf('%s/composer.json', $argv[1]))))->require, 'laravel/framework')) {
@loranger
loranger / index.php
Created October 3, 2017 15:18
Session handler issue
<?php
function session_handler_open($save_path, $session_name) {
return TRUE;
}
function session_handler_close() {
return TRUE;
}
@loranger
loranger / install.sh
Created May 16, 2017 13:28
Script d'install
#!/bin/sh
## Homebrew
if test ! $(which brew)
then
echo 'Installation de Homebrew'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew update
@loranger
loranger / alias.sh
Created May 16, 2017 13:18
Global upgrade
function growl() {
terminal-notifier -activate com.googlecode.iterm2 -sender com.googlecode.iterm2 -title "Hep !!" -subtitle "iTerm2 a un message :" -message "$@" -timeout 3 & say "$@" -v Thomas > /dev/null 2>&1
}
alias upgrade-osx='sudo softwareupdate -i -a && mas outdated && mas upgrade'
alias upgrade-brew='brew update && brew upgrade && brew cleanup --force && brew prune && brew cask cleanup && brew bundle dump --global --force'
alias upgrade-cask='for c in `brew cask list`; do ! brew cask info $c | grep -qF "Not installed" || brew cask install $c; done && brew cask cleanup'
version: '2'
services:
dnsmasq:
image: andyshinn/dnsmasq:latest
restart: always
ports:
- "53535:53/tcp"
- "53535:53/udp"
cap_add:
- NET_ADMIN
@loranger
loranger / gist:48029b227e46f062da05
Created December 3, 2015 10:01
OneName verification
Verifying that +laurentg is my blockchain ID. https://onename.com/laurentg