This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>{% if page.title != 'Home' and page.title != '' %}{{ page.title }} - {% endif %}Simon's Blog</title> | |
<link rel="stylesheet" href="/tools/bootstrap.min.css?cache={{ "now"|date("U") }}" type="text/css" charset="utf-8"/> | |
<link rel="stylesheet" href="/style/css/style.css?cache={{ "now"|date("U") }}" type="text/css" charset="utf-8"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="generator" content="Gumdrop"> | |
<meta name="author" content="Simon Jodet"> | |
<link rel="alternate" type="application/rss+xml" href="http://feeds.feedburner.com/jodet/blog"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom"> | |
<title>Simon's Blog</title> | |
<link href="http://blog.jodet.com/atom.xml" rel="self"/> | |
<link href="http://blog.jodet.com/"/> | |
<updated>{{ pages|reverse[0].date|date(DATE_ATOM) }}</updated> | |
<id>http://blog.jodet.com/</id> | |
<author> | |
<name>Simon Jodet</name> | |
</author> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Database | |
{ | |
/** | |
* @var \Doctrine\DBAL\Connection | |
*/ | |
private $conn; | |
public function __construct(\Silex\Application $app) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app['security.firewalls'] = array( | |
'user_firewall' => array( | |
'pattern' => new \Application\UserRequestMatcher($app['request']), | |
'form' => array('login_path' => '/login', 'check_path' => '/authenticate'), | |
'logout' => array('logout_path' => '/logout'), | |
'users' => $app->share(function () use ($app) | |
{ | |
return new \Application\UserProvider($app); | |
}), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PHP 5.3+ (CLI) required. Should work with stock PHP on Mac OS 10.8. | |
cd /tmp | |
php -r "$(curl -s https://raw.github.com/simonjodet/gumdrop/develop/installer.php|tail -n +2)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --user "simonjodet" -i --data '{"content": "new test","encoding": "utf-8"}' https://api.github.com/repos/simonjodet/sandbox/git/blobs | |
HTTP/1.1 201 Created | |
Server: nginx | |
Date: Tue, 18 Dec 2012 08:13:45 GMT | |
Content-Type: application/json; charset=utf-8 | |
Connection: keep-alive | |
Status: 201 Created | |
Location: https://api.github.com/repos/simonjodet/sandbox/git/blobs/6e6ab611ec78d425b37fcb26c3d817d71e58afcb | |
ETag: "4774fa91e9a71a16564b43460b72d649" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VOL='/dev/'$(diskutil list | grep -Eo '.*Apple_HFS Pictures.*' | grep -Eo 'disk.s.') | |
hdiutil mountvol $VOL | |
open -W /Applications/iPhoto.app | |
hdiutil detach $VOL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input} | |
tell application "iTunes" | |
set newFile to input as POSIX file | |
set newAddition to (add newFile) | |
tell newAddition to set video kind to TV show | |
end tell | |
end run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('myApp').directive( | |
'ngToggle', | |
function() { | |
var factory = { | |
restrict: 'A', | |
link: function postLink(scope, element, attributes) { | |
$(element).on('click', function(event) { | |
event.preventDefault(); |