Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Seldaek's full-sized avatar
😀
😀

Jordi Boggiano Seldaek

😀
😀
View GitHub Profile
@Seldaek
Seldaek / deploy.sh
Created February 13, 2012 18:15
Deployment script
#!/bin/sh
targetUser="seld"
targetHost="seld.be"
parentDir="/home/seld"
childDir="packagist.org"
port="22"
configFile="~/etc/conf/$childDir.yml"
@Seldaek
Seldaek / composer.json
Created February 17, 2012 16:22
standard-distro temp
{
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.2",
"symfony/symfony": "2.1.0-dev",
"doctrine/orm": "2.2.0",
"doctrine/doctrine-bundle": "master-dev",
"twig/extensions": "master-dev",
@Seldaek
Seldaek / RSSFeedGen.php
Created February 17, 2012 17:38
Old RSS Feed "lib"
<?php
namespace Seld\RSSBundle;
/**
* RSS feed (RSS 2.0) generator
*
* all the mandatory fields are set in the constructor, the rest is
* accessible either through public properties or public methods.
*
@Seldaek
Seldaek / composer.json
Created March 9, 2012 08:52
Private Repo Handling
{
"repositories": [ { "type": "composer", "url": "http://composer.example.org/" } ],
"require": {
"company/package": "1.2.0",
"company/package2": "1.5.2",
"company/package3": "dev-master"
}
}
@Seldaek
Seldaek / gitconfig
Created March 27, 2012 08:37
Git config aliases
[alias]
co = checkout
ci = commit
st = status
br = branch
rb = rebase
fu = !git fetch upstream
fo = !git fetch origin
p = push
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an %cr)%Creset' --abbrev-commit --date=relative
@Seldaek
Seldaek / Comments.mdown
Created May 21, 2012 08:11
PHAR build script

This creates a $buildphar as $root/$target/foo.phar + one phar per tag as $root/$target/download/$tag/foo.phar

It also dumps the latest git commit hash built in $root/$target/version

@Seldaek
Seldaek / LoggerInterface.php
Created November 16, 2012 10:35
LoggerInterface PSR Proposal
<?php
namespace PSR\Log;
/**
* Describes a logger instance
*
* The message MUST be a string.
*
* The context array can contain arbitrary data, the only assumption that
@Seldaek
Seldaek / Authenticator.php
Created November 20, 2012 11:19
Simple Symfony Auth example
<?php
namespace Acme\DemoBundle\Security;
use Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\HttpFoundation\Request;
@Seldaek
Seldaek / composer.json
Created February 19, 2013 15:55
security checker integration
{
// ...
"scripts": {
"post-update-cmd": [
"checker security:check composer.lock"
]
}
}
@Seldaek
Seldaek / gist:6711020
Last active December 23, 2015 23:39
A curious spam comment
km/h55% 0.0mm/ 0.0mm total11:21 25.5C - 15.8C 1006.7hPaNorth 3.5km/h 12.2km/h55%
0.0mm/ 0.0mm total11:26 25.5C - 15.8C 1006.7hPaSE 6.1km/h 12.2km/h55% 0.0mm/
0.0mm total11:31 25.9C - 15.6C 1006.3hPaEast 7.2km/h 8.7km/h53% 0.0mm/ 0.0mm
total11:36 26.0C - 15.7C 1006.7hPaSouth 5.0km/h 8.7km/h53% 0.0mm/ 0.0mm
total11:41 26.1C - 15.5C 1006.3hPaSSW 9.7km/h 9.7km/h52% 0.0mm/ 0.0mm total11:46
26.0C - 15.4C 1006.3hPaSW 5.0km/h 9.7km/h52% 0.0mm/ 0.0mm total11:51 26.4C -
15.8C 1006.3hPaSW 5.0km/h 9.7km/h52% 0.0mm/ 0.0mm total11:56 26.5C - 16.2C
1006.3hPaNW 8.7km/h 8.7km/h53% 0.0mm/ 0.0mm total12:01 26.1C - 15.8C
1006.3hPaSouth 11.1km/h 11.1km/h53% 0.0mm/ 0.0mm total12:06 26.3C - 16.0C
1006.3hPaNW 7.2km/h 11.1km/h53% 0.0mm/ 0.0mm total12:11 26.6C - 16.3C