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
package myapp.downloads | |
import grails.test.mixin.TestFor | |
import spock.lang.Specification | |
import grails.buildtestdata.mixin.Build | |
/** | |
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions | |
*/ | |
@TestFor( Download ) |
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 | |
/** | |
* Displays a notice in the admin section under some condition. | |
* | |
* @author andrezrv | |
*/ | |
function my_admin_notice() { | |
global $current_screen; |
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 | |
# Disables all kind of file modifications: | |
# core, plugins and themes won't be auto-updated | |
# and file editors won't appear anymore in wp-admin. | |
define( 'DISALLOW_FILE_MODS', true ); | |
# Disables all core updates: | |
define( 'WP_AUTO_UPDATE_CORE', false ); |
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
GRANT ALL PRIVILEGES ON %DB_NAME%.* TO %DB_USER%@%DB_HOST% IDENTIFIED BY '%DB_PASSWORD%'; |
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
#server { | |
# listen 80; | |
# root /srv/www/mysite; | |
index index.php index.html index.htm; | |
# server_name www.mysite.com; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} |
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
# Add scripts to /usr/bin | |
ln -s /srv/www/website/tasks/website-backup-applications.sh /usr/bin/website-backup-applications | |
ln -s /srv/www/website/tasks/website-backup-database.sh /usr/bin/website-backup-database | |
ln -s /srv/www/website/tasks/website-full-backup.sh /usr/bin/website-full-backup | |
ln -s /srv/www/website/tasks/website-switch.sh /usr/bin/website-switch |
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
jQuery( document ).ready( function( $ ) { | |
var scrollable = $('#branding .navbar-inner'); | |
var difference = 5; | |
if ( scrollable.length ) { | |
var a = document.body; | |
var e = document.documentElement; | |
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
echo -e "\e[32m"; | |
while :; do for i in {1..16}; | |
do r="$(($RANDOM % 2))"; | |
if [[ $(($RANDOM % 5)) == 1 ]]; then | |
if [[ $(($RANDOM % 4)) == 1 ]]; then | |
v+="\e[1m $r "; | |
else | |
v+="\e[2m $r "; | |
fi; | |
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
<?php | |
// Prevent Airplane Mode from blocking Google Fonts. | |
add_filter( 'airplane_mode_parse_style', function( $value, $parsed ) { | |
if ( 'fonts.googleapis.com' === $parsed ) { | |
$value = false; | |
} | |
return $value; | |
}, 10, 2 ); |
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
body.nice-framework-page-demos .nice-toggle .nice-toggle-inner { | |
height: auto !important; | |
border: 2px solid transparent !important; | |
} |