Skip to content

Instantly share code, notes, and snippets.

View Metrakit's full-sized avatar
🤘
Coding

Jordane Metrakit

🤘
Coding
View GitHub Profile
@Metrakit
Metrakit / Linns-Desk.markdown
Created February 23, 2015 12:10
Linn's Desk

Linn's Desk

This pen shows a orange coffee mug filled with coffee. Next to the mug is some spilled coffee. Inside the mug are animated ripples.

This could be used as a loader, but since that is not my intention—not sure about the original designer intentions—I have not implemented any relevant code for that purpose. If you do however want to use this as a loader, please have a look at one of my other loaders for accessibility features; e.g. correct markup.

Thanks

CSS rendition of “My Desk” by the talented Linn Fritz. Please visit her portfolio for more excellent work.

@Metrakit
Metrakit / gist:ac471806be94ad8343c4
Created April 25, 2015 11:41
Eager loading de la mort qui tue thanks to Laravel
<?php
// Master Model (Top.php)
class Top extends Eloquent {
public function topServer()
{
return $this->hasOne('TopServer');
}
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
# launch daemon nodejs app
nohup my-app &
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
/^\s*[a-zA-Z]{1}[a-zA-Z][a-zA-Z '-.=#\/]*$/
@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)
@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: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