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
$ 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 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 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 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 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 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 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
$ v up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Clearing any previously set forwarded ports... | |
==> default: Fixed port collision for 22 => 2222. Now on port 2201. | |
==> default: Clearing any previously set network interfaces... | |
==> default: Preparing network interfaces based on configuration... | |
default: Adapter 1: nat | |
default: Adapter 2: hostonly | |
==> default: Forwarding ports... | |
default: 22 => 2201 (adapter 1) |
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
This is a test gits. |
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
require 'net/http' | |
require 'uri' | |
# /api/v1/:format/new | |
# /api/v1/:format/gists/:user | |
# /api/v1/:format/:gist_id | |
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), | |
{ 'files[file1.ab]' => 'CONTNETS', | |
'files[file2.ab]' => 'contents' }) |
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
MouseAdapter handler = new MouseAdapter() { | |
//Override methods | |
} | |
// Get all children of the combobox | |
Component c[] = combobox.getComponents(); | |
for (int i =0; i < c.length; i++) { | |
// add event listener to all of the child components | |
c[i].addMouseListener(handler); | |
} |
OlderNewer