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 | |
/** | |
* A view helper to render a sheet of address labels as a PDF. | |
*/ | |
class My_View_Helper_Labels extends Zend_View_Helper_Abstract { | |
/** | |
* @var int A page size constant from Zend_Pdf_Page | |
*/ | |
private $_pageSize; |
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
/** | |
* Convert Latitude and Longitude to CSS top and left positions for a map image. | |
* Works with any map image that uses Spherical Mercator Projection (the same as Google Maps) | |
* | |
* From http://stackoverflow.com/a/7021776/86780 | |
*/ | |
var latLonToTopLeft = function(lat, lon) { | |
var imageNorthLat = 59.545457; // Latitude of the image's northern edge | |
var imageSouthLat = 49.431947; // Latitude of the image's southern edge |
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
Show hidden characters
[ | |
{ | |
"class": "label_control", | |
"color": [255, 255, 255], | |
"shadow_color": [24, 24, 24], | |
"shadow_offset": [0, -1] | |
}, | |
{ | |
"class": "button_control", | |
"content_margin": [6, 5, 6, 6], |
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
{ | |
"auto_complete_commit_on_tab": false, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"draw_minimap_border": false, | |
"fade_fold_buttons": false, | |
"find_selected_text": true, | |
"font_face": "Menlo", | |
"highlight_line": true, | |
"highlight_modified_tabs": true, |
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> | |
<html> | |
<head> | |
<title>crontab2puppet - Convert a crontab to a puppet manifest.</title> | |
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
</head> | |
<body style="padding: 20px"> | |
<h1>crontab2puppet</h1> |
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
#!/bin/sh | |
# | |
# Execute phing commands inside a vagrant VM, without having | |
# to `vagrant ssh` first. | |
# | |
CMD="cd /vagrant && phing $@" | |
vagrant ssh --command "cd /vagrant && $CMD" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^.*$ index.php [NC,L] |
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
-- source http://stackoverflow.com/a/13764961/86780 | |
SELECT `DROP`,`CREATE` FROM ( | |
SELECT | |
CONCAT("ALTER TABLE `", `K`.`TABLE_NAME`, "` DROP FOREIGN KEY `", `K`.`CONSTRAINT_NAME`, "`;") "DROP", | |
CONCAT("ALTER TABLE `", | |
`K`.`TABLE_NAME`, | |
"` ADD CONSTRAINT ", | |
"`fk_", | |
`K`.`TABLE_NAME`, |
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
wget --spider -o ./wget.log -r -p http://www.example.com | |
grep -B 2 '\.\.\. 40[0-9]\|\.\.\. 50[0-9]' wget.log | sed '/Reusing/d' | sed 's/^HTTP.*\.\.\. //' | sed 's/--.*-- //' | sed '/^--$/d' > broken-links.log |
OlderNewer