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
git rm -rf <directory_name> |
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
Symbol.bindSymbolAction(compId, symbolName, "creationComplete", function(sym, e) { | |
sym.globalFunction = function(){ | |
// statements | |
console.log("do something"); | |
} | |
}); | |
//To call this function from another symbol : | |
sym.getComposition().getStage().globalFunction(); |
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 | |
// Facebook Open Graph | |
add_action('wp_head', 'add_fb_open_graph_tags'); | |
function add_fb_open_graph_tags() { | |
if (is_single()) { | |
global $post; | |
if(get_the_post_thumbnail($post->ID, 'thumbnail')) { | |
$thumbnail_id = get_post_thumbnail_id($post->ID); | |
$thumbnail_object = get_post($thumbnail_id); |
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 | |
try | |
{ | |
$user = Sentry::authenticate($credentials, false); | |
if ($user) | |
{ | |
return Redirect::route('admin.pages.index'); | |
} |
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
$.fn.preload = function() { | |
this.each(function(){ | |
$('<img/>')[0].src = this; | |
}); | |
} | |
// Usage: | |
$(['img1.jpg','img2.jpg','img3.jpg']).preload(); |
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 | |
//http://markvaneijk.com/route-patterns-in-laravel | |
Route::pattern('id', '[0-9]+'); | |
Route::pattern('hash', '[a-z0-9]{32}'); | |
Route::pattern('slug', '[a-z0-9-]+'); | |
Route::pattern('username', '[a-z0-9-]{3,20}'); |
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
javascript:(function(){ window.open('http://url2pin.it/'+window.location.host+window.location.pathname, 'http://url2pin.it/');})(); |
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 | |
//Custom pagination | |
function wp_bootstrap_pagination() | |
{ | |
global $wp_query; | |
$big = 999999999; | |
$current = max(1, get_query_var('paged')); | |
$paginate = paginate_links(array( |
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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
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
module.exports = function(grunt) { | |
// set up grunt | |
}; |