The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| # ------------------------------------------------------------------------------ | |
| # tlp - Parameters for power save | |
| # Hint: some features are disabled by default, remove the leading # to enable them | |
| # Set to 0 to disable/1 to enable TLP | |
| TLP_ENABLE=1 | |
| # Seconds laptop mode has to to wait after the disk goes idle before doing a sync. | |
| # Non-zero value enables, zero disables laptop mode. |
| /* Git Command Tricks | |
| (C) 2003 Dinh Quan Nguyen a.k.a Narga <dinhquan (at) narga (dot) net> | |
| * Website: http://www.narga.net | |
| * http://www.narga.org | |
| * | |
| * You are allowed to use this software in any way you want providing: | |
| * 1. You must retain this copyright notice at all time | |
| * 2. You must not claim that you or any other third party is the author of this software in any way. | |
| * 3. Feedback to me (dinhquan@narga.net) when you use my works, I will add you to customer list! | |
| * 4. The CSS, XHTML, JS and design is released under GPL: http://www.opensource.org/licenses/gpl-license.php |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| " copy all this into a vim buffer, save it, then... | |
| " source the file by typing :so % | |
| " Now the vim buffer acts like a specialized application for mastering vim | |
| " There are two queues, Study and Known. Depending how confident you feel | |
| " about the item you are currently learning, you can move it down several | |
| " positions, all the way to the end of the Study queue, or to the Known | |
| " queue. | |
| " type ,, (that's comma comma) |
| #!/usr/bin/env bash | |
| GIT_DIR_SAVE=$GIT_DIR ; unset GIT_DIR | |
| GIT_WORK_TREE_SAVE=$GIT_WORK_TREE ; unset GIT_WORK_TREE | |
| if [ ! -f "${OPENSHIFT_DATA_DIR}composer/bin/composer" ]; then | |
| export COMPOSER_HOME="${OPENSHIFT_DATA_DIR}.composer" | |
| echo $COMPOSER_HOME > ${OPENSHIFT_HOMEDIR}.env/user_vars/COMPOSER_HOME | |
| echo "Installing composer" | |
| curl -s https://getcomposer.org/installer | env - PATH="/usr/bin:$PATH" php -- --install-dir=$OPENSHIFT_DATA_DIR >/dev/null |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
| */ | |
| $args = array( |
| # Basically the nginx configuration I use at konklone.com. | |
| # I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
| # | |
| # To provide feedback, please tweet at @konklone or email eric@konklone.com. | |
| # Comments on gists don't notify the author. | |
| # | |
| # Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
| # Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
| server { |
| <?php | |
| function clear_jetpack_published() { | |
| if(empty($_REQUEST['post'])) { | |
| wp_die(__('Invalid post ID or action')); | |
| } | |
| global $wpdb; | |
| $id = isset($_REQUEST['post']) ? absint($_REQUEST['post']) : ''; |
| # Install wordpress | |
| wp core download && wp core config --dbname=wordpress_test_db --dbuser=root && wp core install --url=http://localhost/wp-cli/ --title=Wordpress --admin_user=admin --admin_password=admin --admin_email=youremail@domain.com | |
| # Install and activate Plugins | |
| wp plugin install wordpress-importer --activate && wp plugin install contact-form-7 --activate | |
| # Generate Posts | |
| curl http://loripsum.wpwolf.com | wp post generate --post_content --count=10 | |
| # Activate a theme |