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 | |
| /** | |
| * sfValidatorZip validates a zip code. | |
| * | |
| * @author Brent Shaffer <bshafs@gmail.com> | |
| */ | |
| class sfValidatorZip extends sfValidatorRegex | |
| { |
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
| /* | |
| * AppController.j | |
| * OutlineView | |
| * | |
| * Created by Chandler Kent on December 7, 2009. | |
| * Copyright 2009, Your Company All rights reserved. | |
| */ | |
| @import <Foundation/CPObject.j> | |
| @import <AppKit/CPOutlineView.j> |
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> | |
| <!-- Helpful things to keep in your <head/> | |
| // Brian Blakely, 360i | |
| // http://twitter.com/brianblakely/ | |
| --> | |
| <head> | |
| <!-- Disable automatic DNS prefetching. | |
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
| def new_user(admin_username, admin_password): | |
| env.user = 'root' | |
| # Create the admin group and add it to the sudoers file | |
| admin_group = 'admin' | |
| runcmd('addgroup {group}'.format(group=admin_group)) | |
| runcmd('echo "%{group} ALL=(ALL) ALL" >> /etc/sudoers'.format( | |
| group=admin_group)) | |
| # Create the new admin user (default group=username); add to admin group |
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
| function t(s,d,p){for(p in d)s=s.replace(new RegExp('{'+p+'}','g'),d[p]);return s;} | |
| /* | |
| String templating engine: | |
| t("Hello {name}!, It is {date}!", { name: "Thomas", date: function(){ return new Date }}); | |
| // = "Hello Thomas!, It is Sun May 08 2011 15:15:33 GMT-0400 (EDT)!" | |
| */ |
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
| document.click = function(x, y) { | |
| "use strict"; | |
| var | |
| doc = this | |
| , node = doc.elementFromPoint(x, y) | |
| , click = doc.createEvent("UIEvent") | |
| ; | |
| click.initUIEvent("click", true, true, self, 1); | |
| return node.dispatchEvent(click); |
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 | |
| namespace Nrk\Monolog\Handler; | |
| use Predis\Client; | |
| use Monolog\Logger; | |
| use Monolog\Formatter\JsonFormatter; | |
| use Monolog\Handler\AbstractProcessingHandler; | |
| /** |
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
| /* | |
| * create-view.js | |
| * Easily create new views for accessing clean builtins, etc. | |
| * | |
| * 2011-10-11 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
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> | |
| <script src="url.js"></script> | |
| <script> | |
| var url = new URL('http://www.example.com/a/b/c.html?p=q&r=s&p&p=t#hash'); | |
| for (var key in url) { | |
| console.log(key, url[key]); | |
| } |
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
| namespace :symfony do | |
| namespace :assets do | |
| desc "Updates assets version" | |
| task :update_version do | |
| run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml" | |
| end | |
| end | |
| end | |
| before "symfony:assetic:dump" do |
OlderNewer