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
-- required for foreign keys on block table (MySQL requirement) | |
create index module on block(module); | |
-- required so foreign keys can be created | |
alter table node_comment_statistics modify column last_comment_uid int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The user ID of the latest author to post a comment on this node, from comment.uid.'; | |
alter table block_custom modify column bid int(11) NOT NULL AUTO_INCREMENT COMMENT 'The block’s block.bid.'; | |
alter table authmap modify column uid int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User’s users.uid.'; | |
alter table watchdog modify column uid int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The users.uid of the user who triggered the event.'; | |
alter table history modify nid int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The node.nid that was read.'; | |
alter table history modify uid int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The users.uid that read the node nid.'; |
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
--type-add=css=.sass,.less,.scss | |
--type-add=ruby=.rake,.rsel,.builder,.thor | |
--type-add=html=.haml,.html.erb,.html.haml | |
--type-add=js=.js.erb,.coffee | |
--type-set=cucumber=.feature | |
--type-set=c=.c,.cpp,.ino,.pde,.h | |
--ignore-dir=vendor | |
--ignore-dir=log | |
--ignore-dir=tmp | |
--ignore-dir=doc |
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 | |
// Resizer and Image Manipulation | |
// Based on: http://forums.laravel.com/viewtopic.php?id=2648 | |
public function post_edit_logo($id) | |
{ | |
$rules = array( | |
'image' => 'image', | |
); |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
var urls = []string{ | |
"https://splice.com/", |
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
var seafloor = L.tileLayer('tiles/nz-seafloor/{z}/{x}/{y}.png', { | |
maxZoom: 9, | |
attribution: 'Map data from <a href="http://www.niwa.co.nz/our-science/oceans/bathymetry">NIWA</a>' | |
}); | |
var topo = L.tileLayer('tiles/nz-topo/{z}/{x}/{y}.png', { | |
attribution: '<a href="http://data.linz.govt.nz/">LINZ</a>, <a href="http://lris.scinfo.org.nz/">LRIS</a>' | |
}); | |
var map = new L.Map('map', { |
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
/* | |
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
* | |
* Usage: | |
* $ casperjs screenshots.js http://example.com | |
*/ | |
var casper = require("casper").create(); |
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
set :application, "App Name" # Your app name | |
set :repository, "git@github.com:xxxxx/xxx.git" # Your git repository | |
set :document_root, "/home/user/www/awesome_app" | |
set :deploy_via, :remote_cache | |
# SSH Settings | |
set :user, "user_ssh" | |
set :password, "password_ssh" | |
set :use_sudo, false |
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
.vagrant | |
Gemfile.lock | |
Berksfile.lock | |
tmp/ |
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
Array | |
( | |
[hook_menu] => 6744 | |
[hook_uninstall] => 4742 | |
[hook_perm(ission)] => 4012 | |
[hook_install] => 3751 | |
[hook_theme] => 3525 | |
[hook_schema] => 3003 | |
[hook_help] => 2465 | |
[hook_form_alter] => 2273 |
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
/** | |
* This casper scipt checks for 404 internal links for a given root url. | |
* | |
* Usage: | |
* | |
* $ casperjs 404checker.js http://mysite.tld/ | |
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
*/ | |
/*global URI*/ |