This file contains 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
[alias] | |
co = checkout | |
ci = commit | |
br = branch | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
st = status | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto |
This file contains 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
python -c 'import random; print(random.randint(pow(10,3),int(2*pow(10,8)/365)))' 'Gare du Nord' |
This file contains 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
# Orignal version taken from http://www.djangosnippets.org/snippets/186/ | |
# Original author: udfalkso | |
# Modified by: Shwagroo Team and Gun.io | |
import sys | |
import os | |
import re | |
import hotshot, hotshot.stats | |
import tempfile | |
import StringIO |
This file contains 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
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
This file contains 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 | |
echo '<pre>'; | |
print_r(sfContext::getInstance()->getUser()->getAttributeHolder()->getAll()); | |
echo '</pre>'; | |
die(); |
This file contains 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
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> | |
FileETag none | |
<IfModule mod_headers.c> | |
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT" | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "modification plus 10 years" |
This file contains 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
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> | |
FileETag none | |
<IfModule mod_headers.c> | |
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT" | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "modification plus 10 years" |
This file contains 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 myForm extends sfFormDoctrine | |
{ | |
public function processValues($values = null) | |
{ | |
$values = parent::processValues($values); | |
// calculate the value of virtual field "foo" | |
$values['foo'] = $foo; | |
return $values; |
This file contains 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
$result = $this | |
->createQuery('r') | |
->select('r.*, e.*') | |
->from('BookingResource r') | |
->leftJoin( | |
'r.Entries e ON '. | |
'( ( e.ending_at > :start AND e.ending_at <= :end ) OR '. | |
' ( e.starting_at < :end AND e.starting_at >= :start ) OR '. | |
' ( e.starting_at < :start AND e.ending_at > :end ) )' | |
) |
This file contains 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
// WITH SPACE: BUGGY | |
$result = $this | |
->createQuery('r') | |
->select('r.*, e.*') | |
->from('BookingResource r') | |
->leftJoin( | |
'r.Entries e ON '. | |
'( r.id = e.resource_id AND '. | |
'( ( e.ending_at > :start AND e.ending_at <= :end ) OR '. |
OlderNewer