INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');
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
# OSX for Pentesting (Mavericks/Yosemite) | |
# | |
# A fork of OSX for Hackers (Original Source: https://gist.github.com/brandonb927/3195465) | |
#!/bin/sh | |
# Ask for the administrator password upfront | |
echo "Have you read through the script prior to running this? (y or n)" | |
read bcareful |
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
/** New API */ | |
const PlayerService = { | |
getPlayerTeam: (playerId) => { | |
return new Promise((resolve, reject) => { | |
$.ajax({ | |
url: `/player/${playerId}/team`, | |
success: (data) => { | |
resolve(data) | |
}, | |
error: (error) => { |
Inspired by this gist.
- Create a new App Script project.
- Paste the content of the file
google-app-script-crud.gs
in the defaultCode.gs
file. - Create a new Spreadsheet.
- Copy the Spreadsheet ID found in the URL into the variable
SHEET_ID
located in line 1 of your file.
By Ryan Aunur Rassyid
Simplily create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.
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
# Local development file size upload | |
php_value upload_max_filesize 5000M | |
php_value post_max_size 2400M | |
php_value memory_limit 600M | |
php_value max_execution_time 600 | |
php_value max_input_time 300 | |
# Disabling anoying warnings | |
# php_flag display_startup_errors off | |
# php_flag display_errors off |
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
String.prototype.formatUnicorn = String.prototype.formatUnicorn || function () { | |
"use strict"; | |
var str = this.toString(); | |
if (arguments.length) { | |
var t = typeof arguments[0]; | |
var key; | |
var args = ("string" === t || "number" === t) ? | |
Array.prototype.slice.call(arguments) | |
: arguments[0]; |
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
/** | |
* Takes a shortcode and content and returns an array of the partsed attributes of given shortcode | |
* @param string $shortcode the shortcode in context | |
* @param string $content the content where shortcode is found | |
* @return bool|array FALSE if the given conditions are not met|ARRAY of key-values for the shortcode | |
* @author Richard Blondet <http://richardblondet.com/> | |
*/ | |
function parse_shortcodes_attributes( $shortcode, $content = '' ) { | |
if( empty( $content ) ) return 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
/** | |
* @author: Svetto <https://devseon.com/en/wordpress-tutorials/woocommerce-add-a-paypal-unsupported-currency> | |
*/ | |
add_filter( 'woocommerce_paypal_supported_currencies', 'add_a_paypal_valid_currency' ); | |
function add_a_paypal_valid_currency( $currencies ) { | |
array_push ( $currencies , 'DOP' ); // DOP = Dominican Peso. Please change to your country code here. | |
return $currencies; | |
} |
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
function sendEmail() { | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var currentsheet = spreadsheet.getSheetByName('Sheet1'); | |
var data = currentsheet.getDataRange().getValues(); | |
var html = HtmlService.createTemplateFromFile('TEMPLATE'); // create a html file, named template case sentitive | |
var date = new Date(); | |
//loop over each line |
NewerOlder