Skip to content

Instantly share code, notes, and snippets.

View Metrakit's full-sized avatar
🤘
Coding

Jordane Metrakit

🤘
Coding
View GitHub Profile
@Metrakit
Metrakit / gist:96547200c5da80008430
Created March 2, 2016 12:11
ETXTBSY: text file is busy, rename 'npm-debug.log...
Use :
npm install --no-bin-links
or
npm install package --no-bin-links
@Metrakit
Metrakit / gist:c24a510bbad62b0d75a6
Last active March 9, 2016 15:31
Aliases on Cmder (Windows)
homestead=cd /homestead/ && vagrant $*
hs-go=cd /homestead/ && vagrant up && vagrant ssh
subl=sublime_text.exe $*
hosts=sublime_text.exe \Windows\System32\drivers\etc\hosts
hs-edit=sublime_text.exe .homestead\Homestead.yaml
@Metrakit
Metrakit / gist:6f77a9711314fe8be085
Created March 14, 2016 08:03
Styling broken images
http://bitsofco.de/styling-broken-images/
img { /* Same as first example */ }
img:after {
content: "\f1c5" " " attr(alt);
font-size: 16px;
font-family: FontAwesome;
color: rgb(100, 100, 100);
@Metrakit
Metrakit / gist:fd9996fe6dae517caa5bae03207f2b45
Created May 11, 2016 12:58
Use vuejs variables in .blade.php file
@{{ vue-variable }}
@Metrakit
Metrakit / gist:8adcda2ddf2aa7175f365eca2b396f46
Last active May 20, 2016 13:06
Example jQuery function
$.fn.extend({
loadSubmit: function (keepSize) {
if (keepSize == undefined) {
keepSize = true;
}
var submitBtn = $(this).find('.btn-submit');
if (keepSize) {
submitBtn.css('width', submitBtn.outerWidth(true) + 'px');
}
#!/usr/bin/env bash #adding this to force silly gist highlighting. REMOVE THIS
# This is a modified version of the script generated by https://docs.npmjs.com/cli/completion to include `npm install` autocompletion.
# Basically we added `if` blocks to check for `install` subcommand.
###-begin-npm-completion-###
#
# npm command completion script
#
# Installation: npm completion >> ~/.bashrc (or ~/.zshrc)
setlocale(LC_TIME, 'fr_FR.utf8');
Carbon\Carbon::now('Europe/Paris')->formatLocalized('%A %d %B %Y');
opcache.revalidate_path=1
@Metrakit
Metrakit / DropboxServiceProvider.php
Last active August 9, 2016 10:05
ServiceProvider for Dropbox
<?php
namespace App\Providers;
use Storage;
use League\Flysystem\Filesystem;
use Dropbox\Client as DropboxClient;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Dropbox\DropboxAdapter;
@Metrakit
Metrakit / gist:0abbd4309835e0c378993245378cf7bb
Created August 24, 2016 19:57
Unban on Fail2ban : the awesome Tips !
# Display the banned IPs with jail names :
iptables -L
# Unban an IP :
iptables -D jail-name -s IP-HERE -j REJECT or DROP or ...
e.g. :
iptables -D fail2ban-recidive -s 127.0.0.1 -j REJECT