This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import mandrill | |
MANDRILL_API_KEY = "api-key" | |
EMAIL_FROM = "[email protected]" | |
EMAIL_TO = "[email protected]" | |
EMAIL_SUBJECT = "Error Log" |
This file contains hidden or 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
if exists("g:loaded_syntastic_wordpress_phpcs_checker") | |
finish | |
endif | |
let g:loaded_syntastic_wordpress_phpcs_checker = 1 | |
" Use PHP's phpcs checker | |
runtime! syntax_checkers/php/phpcs.vim | |
call g:SyntasticRegistry.CreateAndRegisterChecker({ | |
\ 'filetype': 'wordpress', |
This file contains hidden or 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
import gspread | |
import pandas | |
gc = gspread.login('[email protected]', 'supersecretepassword') | |
book = gc.open('Spreadsheet name') | |
sheet = book.sheet1 #choose the first sheet | |
dataframe = pandas.DataFrame(sheet.get_all_records()) |
This file contains hidden or 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 | |
################################################################################ | |
# Clone the svn Plugin repo into github | |
# Author: Sudar <http://sudarmuthu.com> | |
# | |
# License: Beerware ;) | |
# | |
# Usage: | |
# ./path/to/clone-from-svn-to-git.sh [-p plugin-name] [-a authors-file] [-u svn-username] [-g github-repo-url]` |
This file contains hidden or 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
[Sat May 31 10:24:44 2014] [error] [client 127.0.0.1] Request header read timeout |
This file contains hidden or 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 | |
add_filter( 'edd_sl_license_readme_response', function( $response, $download, $readme ) { | |
$meta_version = get_post_meta( $download->ID, '_edd_sl_version', true ); | |
if ( '' != $readme['stable_tag'] && $meta_version != $readme['stable_tag'] ) { | |
update_post_meta( $download->ID, '_edd_sl_version', $readme['stable_tag']); | |
} | |
return $response; | |
}, 10, 3 ); | |
?> |
This file contains hidden or 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 | |
// Creating tables in Single site installations | |
function on_activate() { | |
create_table(); | |
} | |
function create_table() { | |
global $wpdb; | |
$table_name = $wpdb->prefix . 'table_name'; |
This file contains hidden or 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 | |
add_action( 'pre_insert_term', 'prevent_terms', 1, 2 ); | |
function prevent_terms ( $term, $taxonomy ) { | |
if ( 'areas' === $taxonomy && !current_user_can( 'activate_plugins' ) ) { | |
return new WP_Error( 'term_addition_blocked', __( 'You cannot add terms to this taxonomy' ) ); | |
} | |
return $term; | |
} |
This file contains hidden or 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
$ dpkg --get-selections | grep -v deinstall | |
acpid install | |
adduser install | |
anacron install | |
apache2-mpm-prefork install | |
apache2-utils install | |
apache2.2-bin install | |
apache2.2-common install | |
apt install |
This file contains hidden or 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
def get_length(data): | |
return len(data) |