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
class DynamicLayoutHandler(object): | |
def _check_layout(self): | |
if self.layout is None: | |
raise FormHelpersException("You need to set a layout in your FormHelper") | |
def _check_layout_and_form(self): | |
self._check_layout() | |
if self.form is None: | |
raise FormHelpersException("You need to pass a form instance to your FormHelper") |
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
$rules = array( | |
‘username’ => ‘required|min:8|unique:users|integer’, | |
‘firstname’ => ‘required’, | |
‘lastname’ => ‘required’, | |
‘email’ => ‘required|email’, | |
‘password’ => ‘required|confirmed’ | |
); | |
$messages = array( | |
‘required’ => ‘El campo :attribute es obligatorio.’, |
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
.at2x(@path, @w: auto, @h: auto) { | |
background-image: url(@path); | |
@at2x_path: ~`@{path}.replace(/\.\w+$/, function(match) { return "@2x" + match; })`; | |
@at3x_path: ~`@{path}.replace(/\.\w+$/, function(match) { return "@3x" + match; })`; | |
@media @highdpi { | |
background-image: url("@{at2x_path}"); | |
background-size: @w @h; | |
} |
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
require_once __DIR__ . '/vendor/autoload.php'; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
$app = new Silex\Application(); | |
// $app['debug'] = true; | |
$app->register(new Silex\Provider\UrlGeneratorServiceProvider()); |
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
RewriteRule ^folder_name/.*$ - [PT] |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule ^(.*)$ http://www.mysitehere.com/$1 |
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
find . -name .svn -print0 | xargs -0 rm -rf |
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
tar -pvczf BackUpDirectory.tar.gz /path/to/dir |
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
/** | |
* Minesweeper | |
*/ | |
.left{ float:left; } | |
.right{ float:right; } | |
button{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Minesweeper · CodePen</title> | |
<!-- | |
Copyright (c) 2012 Ignacio Toledo, http://codepen.io/iign | |
Permission is hereby granted, free of charge, to any person obtaining |
OlderNewer