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
<?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
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
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
rsync -a --progress <folder> <target> |
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) { | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
config:{ | |
themeName: 'mythemename', | |
themePath: 'public', | |
assetsPath: 'resources/assets', | |
bowerPath: 'bower_components' |
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
mysqldump -u root -p --no-data databasename tablename > filename.sql |
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
#!/bin/bash -e | |
# brew install imagemagick | |
# Ensure we're running in location of script. | |
cd "`dirname $0`" | |
for f in *; do | |
if [[ $f == *@3x* ]]; | |
then | |
echo "$f -> ${f//@3x/@2x}, ${f//@3x/}" |
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
{ | |
"_comment": "Api Rest templates", | |
"restGet": { | |
"application/json": { | |
"method": "$context.httpMethod" | |
} | |
}, | |
"restPost": { | |
"application/json": "{\n\"method\": \"$context.httpMethod\",\n\"body\": $input.json('$')\n}" | |
}, |