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
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 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
.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 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
$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 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
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 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
$('body').append('<a download class="instadownload">⬇ Download</a><style>.instadownload{ position:absolute; border-radius: 3px; font-size: 20px; z-index: 10000; top: 90px; cursor:pointer; right: 20px; padding: 10px; background-color:#FBFDFF; border: 1px solid #125688;}</style>');$ | |
('.instadownload').attr('href', $('meta[property="og:image"]').attr('content')); | |
Bookmared with: http://mrcoles.com/bookmarklet/ | |
// Paste this | |
javascript:(function()%7B%24('body').append('%3Ca%20download%20class%3D%22instadownload%22%3E%26%2311015%3B%20Download%3C%2Fa%3E%3Cstyle%3E.instadownload%7B%20position%3Aabsolute%3B%20border-radius%3A%203px%3B%20font-size%3A%2020px%3B%20z-index%3A%2010000%3B%20top%3A%2090px%3B%20cursor%3Apointer%3B%20right%3A%2020px%3B%20padding%3A%2010px%3B%20background-color%3A%23FBFDFF%3B%20border%3A%201px%20solid%20%23125688%3B%7D%3C%2Fstyle%3E')%3B%24('.instadownload').attr('href'%2C%20%24('meta%5Bproperty%3D%22og%3Aimage%22%5D').attr('content'))%7D)() |
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
$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 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 | |
import httplib | |
file_list = open('sites.txt', 'r') | |
def check_site(url): | |
conn = httplib.HTTPConnection(url) |
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
# BEGIN GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP |
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
/** | |
* Z | |
*/ | |
body{ | |
margin: 50px | |
} | |
.cover { | |
position: relative; |
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
/** | |
* Z | |
*/ | |
body{ | |
margin: 50px | |
} | |
.cover { | |
position: relative; |