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', 'test@yourdomain.com', '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 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 | |
| # argument espanish or english | |
| echo -n "Installing latest wordpress, choose locale (en/es): ... " | |
| # wait for my input | |
| # read w1 | |
| echo "default locale: en" | |
| w1="en" |
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
| /** | |
| * 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 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
| # 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 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
| /** New API */ | |
| const PlayerService = { | |
| getPlayerTeam: (playerId) => { | |
| return new Promise((resolve, reject) => { | |
| $.ajax({ | |
| url: `/player/${playerId}/team`, | |
| success: (data) => { | |
| resolve(data) | |
| }, | |
| error: (error) => { |
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
| 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 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
| # 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 |
By Ryan Aunur Rassyid
Simplily create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.
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
| 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 |
Inspired by this gist.
- Create a new App Script project.
- Paste the content of the file
google-app-script-crud.gsin the defaultCode.gsfile. - Create a new Spreadsheet.
- Copy the Spreadsheet ID found in the URL into the variable
SHEET_IDlocated in line 1 of your file.
OlderNewer