Skip to content

Instantly share code, notes, and snippets.

View IRCClient.php
<?php
namespace App\Http\Controllers\WCX;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class IRCClient extends Controller
{
protected $socket;
View tt1375666.json
{
"id": "tt1375666",
"title": "Inception",
"originalTitle": "",
"fullTitle": "Inception (2010)",
"type": "Movie",
"year": "2010",
"image": "https://imdb-api.com/images/original/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_Ratio0.6751_AL_.jpg",
"releaseDate": "2010-07-16",
"runtimeMins": "148",
@Gkiokan
Gkiokan / multi-domain-router.js
Created Jan 16, 2022
Multiple Domain Routing with Vue-Router
View multi-domain-router.js
const host = window.location.host;
const parts = host.split('.');
const domainLength = 3; // route1.example.com => domain length = 3
const router = () => {
let routes;
if (parts.length === (domainLength - 1) || parts[0] === 'www') {
routes = index;
} else if (parts[0] === 'route1') {
routes = route1;
@Gkiokan
Gkiokan / TC_withdraw.js
Created Jun 7, 2021
TronConomy withdraw
View TC_withdraw.js
let withdrawalAmount = 10
let fetchOptions = {
headers: {
'Authorization': 'bearer '+window.localStorage["sessionToken"],
'Content-Type': 'application/json'
},
body: JSON.stringify({ amount: window.tronWeb.toSun(withdrawalAmount) }),
method: 'POST'
};
@Gkiokan
Gkiokan / TronConomySC.js
Last active Jan 16, 2022
TronConomy SC
View TronConomySC.js
//pragma solidity 0.5.17;
pragma experimental ABIEncoderV2;
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
View records.js
// https://github.com/muaz-khan/RecordRTC
/*
<!-- recommended -->
<script src="https://www.WebRTC-Experiment.com/RecordRTC.js"></script>
<!-- use 5.6.2 or any other version on cdnjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/RecordRTC/5.6.2/RecordRTC.js"></script>
<!-- NPM i.e. "npm install recordrtc" -->
@Gkiokan
Gkiokan / FacebookProvider.php
Created Oct 23, 2020
FacebookProvider for Socialite October 2020
View FacebookProvider.php
<?php
/*
Author: Gkiokan Sali
Date: 2020-10-23
Comment: This is a working updated Facebook Provider for the Laraval Package Socialite.
It inherits the new changes on the User Image Endpoint and returns the new full User Image path
according to the new specs of fb with an access_token.
https://developers.facebook.com/docs/facebook-login/access-tokens#clienttokens
https://developers.facebook.com/docs/graph-api/reference/user/picture/
View GoogleGeocodingController.php
<?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.
*/
View util.js
/*
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'
@Gkiokan
Gkiokan / speech_prototype.js
Created Nov 14, 2019
WebKit Speech Recognition, playground with Google Chrome
View speech_prototype.js
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) {