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:fd9996fe6dae517caa5bae03207f2b45
Created May 11, 2016 12:58
Use vuejs variables in .blade.php file
@{{ vue-variable }}
@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: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: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:ab62981d53fa3a62153b
Created March 2, 2016 09:35
Homestead versions
Homestead PHP 5.6 (version 0.3.3) :
vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.3.3/providers/virtualbox.box
@Metrakit
Metrakit / gist:0c68e5563ae19e99f823
Created February 19, 2016 08:14
load css asynch
https://jakearchibald.com/2016/link-in-body/
<head>
<script>
// https://github.com/filamentgroup/loadCSS
!function(e){"use strict"
var n=function(n,t,o){function i(e){return f.body?e():void setTimeout(function(){i(e)})}var d,r,a,l,f=e.document,s=f.createElement("link"),u=o||"all"
return t?d=t:(r=(f.body||f.getElementsByTagName("head")[0]).childNodes,d=r[r.length-1]),a=f.styleSheets,s.rel="stylesheet",s.href=n,s.media="only x",i(function(){d.parentNode.insertBefore(s,t?d:d.nextSibling)}),l=function(e){for(var n=s.href,t=a.length;t--;)if(a[t].href===n)return e()
setTimeout(function(){l(e)})},s.addEventListener&&s.addEventListener("load",function(){this.media=u}),s.onloadcssdefined=l,l(function(){s.media!==u&&(s.media=u)}),s}
"undefined"!=typeof exports?exports.loadCSS=n:e.loadCSS=n}("undefined"!=typeof global?global:this)
/^\s*[a-zA-Z]{1}[a-zA-Z][a-zA-Z '-.=#\/]*$/
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
# launch daemon nodejs app
nohup my-app &
@Metrakit
Metrakit / after.sh
Last active April 7, 2016 08:49
Install phpmyadmin on Laravel homestead
#!/bin/sh
# Content of the file 'after.sh' in ~/.homestead/
export DEBIAN_FRONTEND=noninteractive
apt-get --no-install-recommends install -q -y phpmyadmin
echo 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/app-password-confirm password secret' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/mysql/admin-pass password secret' | debconf-set-selections