Skip to content

Instantly share code, notes, and snippets.

@jezhalford
jezhalford / Preferences.sublime-settings
Created April 23, 2013 12:02
Preferences > Settings - User
{
"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,
@jezhalford
jezhalford / Default.sublime-theme
Last active December 16, 2015 00:08
Entire default sublime text 2 theme file, modified to have a dark sidebar and bold folders as per https://gist.github.com/larrybotha/2935636
[
{
"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],
@jezhalford
jezhalford / gist:2480871
Created April 24, 2012 15:45
Map Lat/Lon onto map pixels
/**
* 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
@jezhalford
jezhalford / Labels.php
Created April 4, 2012 11:27
Zend Framework view helper to render a sheet of address labels as a PDF
<?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;