Skip to content

Instantly share code, notes, and snippets.

View loranger's full-sized avatar

Laurent Goussard loranger

View GitHub Profile
@loranger
loranger / bower update log
Created February 8, 2013 17:52
Bower update does not update
loranger@Merlin:~/my/project/ $ bower list
bower discover Please wait while newer package versions are being discovered
/Users/loranger/my/project/
├── project#
├── jQuery-Parallax#bdcb08f5b6936d1920146ba7973112c3341eba8c
├── jquery#1.8.3 (1.9.1 now available)
├── jquery-scrollspy#2edc2d98e0256cb79cecce61e8c17f2a0a3b8952
├─┬ jquery.localScroll#50a228350f9d769548c83b2e295d952a4e96ae8f
│ ├── jquery#1.8.3 (1.9.1 now available)
│ └─┬ jquery.scrollTo#1.4.4
@loranger
loranger / dbg.html
Created November 29, 2012 10:54
Debug jQuery trigger
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Lazy Load</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://raw.github.com/loranger/lazyLoader/master/lazyloader.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
@loranger
loranger / bower.log
Created October 3, 2012 09:25
Bower issue on saving
loranger@Merlin:~/Sites/issue $ ls -l
loranger@Merlin:~/Sites/issue $ npm update bower
loranger@Merlin:~/Sites/issue $ bower -v
0.2.0
loranger@Merlin:~/Sites/issue $ rm -rf ~/.bower
loranger@Merlin:~/Sites/issue $ touch component.json
loranger@Merlin:~/Sites/issue $ bower install --save jquery angular
bower cloning git://github.com/components/jquery.git
bower caching git://github.com/components/jquery.git
bower cloning git://github.com/angular/bower-angular.git
@loranger
loranger / fetchAvatars.pl
Created July 11, 2012 14:11
Gource current git working copy
#!/usr/bin/perl
#fetch Gravatars
use strict;
use warnings;
use LWP::Simple;
use Digest::MD5 qw(md5_hex);
my $size = 90;
<?php
function slugify($string)
{
$replacement = array(
'/&([a-z])(acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml);/i' => '$1',
'/\s/i' => '_',
'/\W/i' => ''
);
return preg_replace(array_keys($replacement), array_values($replacement), htmlentities($string, ENT_NOQUOTES, 'utf-8'));
@loranger
loranger / gist:2838465
Created May 30, 2012 19:35
brew doctor
loranger@Merlin:~ $ brew doctor
Error: Formula apc-php will not import.
Error: Formula composer-php will not import.
Error: Formula gearman-php will not import.
Error: Formula imagick-php will not import.
Error: Formula intl-php will not import.
Error: Formula mcrypt-php will not import.
Error: Formula memcache-php will not import.
Error: Formula memcached-php will not import.
@loranger
loranger / brew --config
Created May 21, 2012 12:29
Brew imagick-php 3.0.1 verbose install failure report
HOMEBREW_VERSION: 0.9
HEAD: 942f6922525fe65b080915c3dec7da58fa661c92
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.4
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: N/A
{"menu":{"id":"file","number":12,"value":"File","popup":{"menuitem":[{"value":"New","onclick":"CreateNewDoc()"},{"value":"Open","onclick":"OpenDoc()"},{"value":"Close","onclick":"CloseDoc()"}]}}}
@loranger
loranger / gist:1739806
Created February 4, 2012 20:07
Upgrading rtmpdump
==> Upgrading rtmpdump
Warning: Building with LLVM, but this formula is reported to not work with LLVM:
Crashes at runtimeTested with LLVM build 2335
We are continuing anyway so if the build succeeds, please open a ticket with
the following information: 2335-10.7. So
that we can update the formula accordingly. Thanks!
If it doesn't work you can: brew install --use-gcc
@loranger
loranger / dabblet.css
Created February 2, 2012 19:39
Je peux pas faire mieux que ça.
/*
Je peux pas faire mieux que ça.
Là, ça a l'air cool mais si tu ajoutes plus de contenu à gauche qu'à droite ça part en couille.
À ce problème, je ne vois qu'une seule solution : Le javascript.
Si la hauteur de .left est supérieure à la hauteur de .container, alors $('.container').height( $('.left').height() );
'fin tu vois quoi...
*/
.container {
background: rgba(0, 0, 0, .1);
text-align: center;