Cheatsheet: http://cheats.jesse-obrien.ca/
PhpStorm Helper: https://github.com/laravelbook/laravel4-phpstorm-helper
<?php | |
require 'tmhOAuth.php'; // Get it from: https://github.com/themattharris/tmhOAuth | |
// Use the data from http://dev.twitter.com/apps to fill out this info | |
// notice the slight name difference in the last two items) | |
$connection = new tmhOAuth(array( | |
'consumer_key' => '', | |
'consumer_secret' => '', | |
'user_token' => '', //access token |
Cheatsheet: http://cheats.jesse-obrien.ca/
PhpStorm Helper: https://github.com/laravelbook/laravel4-phpstorm-helper
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
//Simple Ajax Login Form | |
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
//html | |
<form id="login" action="login" method="post"> | |
<h1>Site Login</h1> | |
<p class="status"></p> | |
<label for="username">Username</label> | |
<input id="username" type="text" name="username"> |
Getting started:
Related tutorials:
<?php | |
/** | |
* WordPress custom install script. | |
* | |
* Drop-ins are advanced plugins in the wp-content directory that replace WordPress functionality when present. | |
* | |
* Language: nl | |
* | |
* if ( file_exists( WP_CONTENT_DIR . '/install.php' ) ) { | |
* require ( WP_CONTENT_DIR . '/install.php' ); |
<?php | |
// No, Thanks. Direct file access forbidden. | |
! defined( 'ABSPATH' ) AND exit; | |
// INIT | |
add_action( 'after_setup_theme', array( 'unavailable_post_status', 'init' ) ); | |
class unavailable_post_status extends wp_custom_post_status | |
{ | |
/** |
<?php | |
$codes = [ | |
'ab' => 'Abkhazian', | |
'aa' => 'Afar', | |
'af' => 'Afrikaans', | |
'ak' => 'Akan', | |
'sq' => 'Albanian', | |
'am' => 'Amharic', | |
'ar' => 'Arabic', |
<?php | |
/** | |
* This file will activate the Airplane Mode plugin if not already activated. This is helpful when you do not have internet connection and you're unable to reach the WP Admin Plugins page to activate the plugin. | |
*/ | |
// get WP bootstrap | |
define('WP_USE_THEMES', false); | |
require(__DIR__ . '/wp/wp-blog-header.php'); | |
<?php | |
$cmd = "zip -9prv content_backup.zip ."; | |
$pipe = popen($cmd, 'r'); | |
if (empty($pipe)) { | |
throw new Exception("Unable to open pipe for command '$cmd'"); | |
} | |
stream_set_blocking($pipe, false); | |
echo "\n"; |