⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
// once the google maps is loaded, put a Raphael canvas on top of it | |
// be sure to apply margin:0 to the body in this case | |
var point = new GLatLng(46.065375, 5.448974); | |
var pixel = map.fromLatLngToContainerPixel(point); | |
var paper = Raphael(0, 0, 400, 300); | |
var circle = paper.circle(pixel.x, pixel.y, 10); | |
circle.attr("fill", "#f00"); | |
circle.attr("stroke", "#fff"); |
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 is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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 | |
/* | |
Description: Adds a taxonomy filter in the admin list page for a custom post type. | |
Written for: http://wordpress.stackexchange.com/posts/582/ | |
By: Mike Schinkel - http://mikeschinkel.com/custom-workpress-plugins | |
Instructions: Put this code in your theme's functions.php file or inside your own plugin. Edit to suite your post types and taxonomies. Hope this helps... | |
*/ | |
add_filter('manage_listing_posts_columns', 'add_businesses_column_to_listing_list'); | |
function add_businesses_column_to_listing_list( $posts_columns ) { | |
if (!isset($posts_columns['author'])) { |
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 express = require('express'); | |
var sys = require('sys'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
function consumer() { |
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 | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
} | |
?>hi |
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
/* | |
* Fabrizio Calderan, twitter @fcalderan, 2010.11.02 | |
* I had an idea: could Inception movie be explained by a few javascript closures | |
* and variable resolution scope (just for fun)? | |
* | |
* Activate javascript console =) | |
*/ | |
<script> | |
console.group("inception movie"); |
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 | |
// Register the column | |
function price_column_register( $columns ) { | |
$columns['price'] = __( 'Price', 'my-plugin' ); | |
return $columns; | |
} | |
add_filter( 'manage_edit-post_columns', 'price_column_register' ); |
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
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
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
// Sass exponent support | |
@function exponent($base, $exponent) | |
// reset value | |
$value: $base | |
// positive intergers get multiplied | |
@if $exponent > 1 | |
@for $i from 2 through $exponent | |
$value: $value * $base | |
// negitive intergers get divided. A number divided by itself is 1 | |
@if $exponent < 1 |
OlderNewer