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> | |
<html lang="en" ng-app="app"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>$parsers demo</title> | |
</head> | |
<body> | |
<form name="sampleForm"> | |
<input name="strongSecret" type="text" ng-model="strongSecret" strong-secret required> | |
<dir ng-messages="sampleForm.strongSecret.$error"> |
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(config) { | |
config.set({ | |
basePath: '', | |
frameworks: ['jasmine'], | |
files: [ | |
// lib | |
'./app/lib/angular/angular.js', | |
'./app/lib/**/angular-*.js', | |
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
angular.element($0).scope().someFunction(); |
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
function fun1() { | |
setTimeout(function() { | |
console.log("fun1 after 5 s.."); | |
}, 5 * 1000); | |
return this; | |
}; | |
function fun2() { | |
setTimeout(function() { | |
console.log("fun2 after another 15 s.."); |
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.redBorder = function () { | |
$(this).css("border", "1px solid red"); | |
return this; | |
// or shorter "return $(this).css("border", "1px solid red");" | |
}; | |
$.fn.greyBackground = function () { | |
return $(this).css("background-color", "grey"); |
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
function doStuff(flag) { | |
var deferred = $.Deferred(); | |
var err = null, | |
data = null; | |
if (flag) { | |
setTimeout(function() { | |
data = ["2", "2"]; | |
deferred.resolve(err, data); | |
}, 5 * 1000) | |
} else { |
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
// Disable Theme Updates # 3.0+ | |
remove_action( 'load-update-core.php', 'wp_update_themes' ); | |
add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) ); | |
wp_clear_scheduled_hook( 'wp_update_themes' ); | |
// Disable Plugin Updates #3.0+ | |
remove_action( 'load-update-core.php', 'wp_update_plugins' ); | |
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) ); | |
wp_clear_scheduled_hook( 'wp_update_plugins' ); |
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
function dashboard_columns() { | |
add_screen_option( | |
'layout_columns', | |
array( | |
'max' => 4, | |
'default' => 1 | |
) | |
); | |
} | |
add_action( 'admin_head-index.php', 'dashboard_columns' ); |
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
// Login Page - No logo | |
function new_custom_login_logo() { | |
echo "<style type='text/css'>h1 { display: none !important; } </style>"; | |
} | |
add_action('login_head', 'new_custom_login_logo'); |
NewerOlder