Skip to content

Instantly share code, notes, and snippets.

View loranger's full-sized avatar

Laurent Goussard loranger

View GitHub Profile
<?php
$url = 'http://sub.site.com/';
if( filter_var($url, FILTER_VALIDATE_URL) ){
echo 'valid uri';
}
$email = 'sub.name@gmail.com';
if( filter_var($email, FILTER_VALIDATE_EMAIL) ){
echo 'valid email';
@loranger
loranger / brew install -v cmake output
Created March 30, 2011 18:40
brew install -v cmake output
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/loranger/Library/Caches/Homebrew
/usr/bin/tar xf /Users/loranger/Library/Caches/Homebrew/cmake-2.8.4.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: /usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe
C++ compiler on this system is: /usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe
Makefile processor on this system is: make
@loranger
loranger / brew doctor output
Created March 30, 2011 18:47
brew doctor output
Your OS X is ripe for brewing.
Any troubles you may be experiencing are likely purely psychosomatic.
@loranger
loranger / brew list --unbrewed | egrep '^(lib|include)' output
Created March 30, 2011 18:49
brew list --unbrewed | egrep '^(lib|include)' output
include/fuse/fuse.h
include/fuse/fuse_common.h
include/fuse/fuse_common_compat.h
include/fuse/fuse_compat.h
include/fuse/fuse_darwin.h
include/fuse/fuse_lowlevel.h
include/fuse/fuse_lowlevel_compat.h
include/fuse/fuse_opt.h
include/fuse.h
lib/audacity/libmp3lame.dylib
@loranger
loranger / env VERBOSE=1 brew install -v cmake
Created March 30, 2011 20:43
env VERBOSE=1 brew install -v cmake
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/loranger/Library/Caches/Homebrew
/usr/bin/tar xf /Users/loranger/Library/Caches/Homebrew/cmake-2.8.4.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: /usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe
C++ compiler on this system is: /usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe
Makefile processor on this system is: make
@loranger
loranger / with ENV.deparallelize
Created March 31, 2011 06:57
with ENV.deparallelize
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/loranger/Library/Caches/Homebrew
/usr/bin/tar xf /Users/loranger/Library/Caches/Homebrew/cmake-2.8.4.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: /usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe
C++ compiler on this system is: /usr/bin/c++ -O3 -march=core2 -msse4.1 -w -pipe
Makefile processor on this system is: make
@loranger
loranger / With gcc
Created March 31, 2011 18:43
with gcc
$ brew install cmake --use-gcc
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/loranger/Library/Caches/Homebrew
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/c
==> make
Scanning dependencies of target cmsys
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.o
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Base64.o
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/MD5.o
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Terminal.o
@loranger
loranger / With gcc and verbose
Created March 31, 2011 18:57
with gcc and verbose
$ VERBOSE=1 brew install -v cmake --use-gcc
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/loranger/Library/Caches/Homebrew
/usr/bin/tar xf /Users/loranger/Library/Caches/Homebrew/cmake-2.8.4.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: /Developer/usr/bin/gcc -O3 -march=core2 -msse4.1 -w -pipe
C++ compiler on this system is: /Developer/usr/bin/g++ -O3 -march=core2 -msse4.1 -w -pipe
@loranger
loranger / Fancy File Inputs.js
Created August 24, 2011 15:28 — forked from davist11/Fancy File Inputs.js
Fancy File Inputs
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
@loranger
loranger / userscript.js
Created September 27, 2011 10:43
Trello badge userscript for FluidApp
// ==UserScript==
// @name Fluid Dock Badge for Trello
// @namespace http://fluidapp.com
// @description Display a dock badge for the Trello Dashboard with the number of new notifications
// @include *.trello.com
// @author Laurent Goussard
// ==/UserScript==
if (!window.fluid) {
return;
}