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
<?php | |
if (!is_user_logged_in() ) { | |
echo "<a href='" . wp_login_url('/') . "'>login</a>"; | |
} else { | |
$user_id = get_current_user_id(); // get user id | |
$app_name = 'app_' . date("y-m-d-H-i-s"); // create random app name | |
$app_pass = WP_Application_Passwords::create_new_application_password( $user_id, array( 'name' => $app_name ) ); // generate pass | |
$chunks = str_split($app_pass[0], 4); // Split string into chunks of 4 characters | |
$result = implode(" ", $chunks); // Join chunks with space between them |
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
set noswapfile | |
set nocompatible | |
set nowrap | |
set expandtab | |
set laststatus=2 | |
set tabstop=4 | |
set shiftwidth=4 | |
set splitright | |
set splitbelow | |
filetype 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
<?php | |
// define the path | |
$filePath = "data.csv"; | |
// check if we can read the file | |
if (($handle = fopen($filePath, "r")) !== FALSE) { | |
// do looping until no more line on csv | |
while (($data = fgetcsv($handle)) !== 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
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async='async'></script> | |
<script> | |
var OneSignal = window.OneSignal || []; | |
OneSignal.push(["init", { | |
appId: "xxxx", | |
subdomainName: 'zzzzz', | |
autoRegister: false, /* Set to true to automatically prompt visitors */ | |
httpPermissionRequest: { | |
enable: true | |
}, |
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
mc_gross=289.00 | |
&outstanding_balance=0.00 | |
&period_type=+Regular | |
&next_payment_date=02%3A00%3A00+Dec+05%2C+2016+PST | |
&protection_eligibility=Eligible | |
&payment_cycle=Daily | |
&address_status=confirmed | |
&tax=0.00 | |
&payer_id=QGEY9E3FZ92JY | |
&address_street=1+Main+St |
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
▶ grep -r ")->" . | |
./App/Comment.php: ( new UserActivity() )->insert( $activity ); | |
./App/Core.php: ( new CustomColumnForPost() )->run(); | |
./App/Core.php: Loader::load( $this->rootPath( '.env' ) )->parse()->putenv(); | |
./App/Core.php: ( new User() )->downloadCsv(); | |
./App/Facebook.php: ( new User() )->create( $this->getMyProfile() ); | |
./App/Facebook.php: $response = $this->fb->getClient()->sendRequest( $request ); | |
./App/Facebook.php: $access_token = $this->doRequest( 'GET', $page_id . '?fields=access_token' )->getGraphNode()['access_token']; | |
./App/Facebook.php: $fbPages = $this->doRequest( 'get', '/' . $id )->getGraphNode(); |
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
<option | |
<?php if ( $global['button_style'] == 'icon-text' ) { | |
echo ' selected="selected"'; | |
}?> value="icon-text"><?php _e( 'Icon + text', 'jetpack' ); ?></option> | |
<option | |
<?php if ( $global['button_style'] == 'icon' ) { | |
echo ' selected="selected"'; | |
} ?> value="icon"><?php _e( 'Icon only', 'jetpack' ); ?></option> |
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
$.ajaxPrefilter( function (options) { | |
if (options.crossDomain && jQuery.support.cors) { | |
var http = (window.location.protocol === 'http:' ? 'http:' : 'https:'); | |
options.url = http + '//cors-anywhere.herokuapp.com/' + options.url; | |
//options.url = "http://cors.corsproxy.io/url=" + options.url; | |
} | |
}); |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
"let Vundle manage Vundle, required |
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
<option>Select Your Country</option> | |
<option value="Afghanistan">Afghanistan</option> | |
<option value="Albania">Albania</option> | |
<option value="Algeria">Algeria</option> | |
<option value="American Samoa">American Samoa</option> | |
<option value="Andorra">Andorra</option> | |
<option value="Angola">Angola</option> | |
<option value="Anguilla">Anguilla</option> | |
<option value="Antarctica">Antarctica</option> | |
<option value="Antigua and Barbuda">Antigua and Barbuda</option> |
NewerOlder