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
// Sample workbook here: | |
// https://docs.google.com/spreadsheets/d/1DPASIiKJw6x0n2eq7t4xRU_FQsizBH8Z8rXOfVk2Kb4/pubhtml | |
// Main function - does everything | |
// Triggered by Google every 15 minutes | |
function getAllTickers() { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Crypto"); | |
// Get all tickers |
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() { | |
// Do not use this library. This is just a fun example to prove a | |
// point. | |
var Bloop = window.Bloop = {}; | |
var mountId = 0; | |
function newMountId() { | |
return mountId++; | |
} |
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
// npm install websocket | |
var WebSocketClient = require('websocket').client; | |
var client = new WebSocketClient(); | |
client.on('connectFailed', function(error) { | |
console.log('Connect Error: ' + error.toString()); | |
}); | |
client.on('connect', function(connection) { |
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 | |
// composer require phpoffice/phpexcel | |
require 'vendor/autoload.php'; | |
// Webfinger | |
$url = "https://wogan.im/@wogan"; | |
/** | |
* Start Webfinger lookup |
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
/* | |
* Instructions: | |
* Open Mastodon, hit F11 (or whatever brings up your console) | |
* Paste this and hit enter | |
* http://i.imgur.com/LtQ5Zk3.gifv | |
*/ | |
$(function(){ | |
// Fetch the Emojione clientside library | |
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/lib/js/emojione.min.js"); |
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 | |
public function build() | |
{ | |
return $this | |
->subject('Mail Subject') | |
->view('vendor.notifications.email')->with([ | |
"level" => "default", | |
"greeting" => "Hi, User!", | |
"introLines" => [ |
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 | |
public function toMail($notifiable) | |
{ | |
return (new MailMessage) | |
->subject('Mail Subject') | |
->greeting('Hi, User!') | |
->line('A line before the big button') | |
->action('Action Button', 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
<?php | |
// See: https://gist.github.com/woganmay/4c15a0f7c16e41ab3a3ea1a73c595bf9 | |
$api_url = sprintf("https://my.flarum.site/api/users/%s/avatar", $user->id); | |
// See: https://gist.github.com/woganmay/88f15e96fc019657a0e594366403b5cf | |
$token = $session->token; | |
$avatar_file = "/storage/avatars/1234.jpg"; // Absolute path preferred |
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 | |
// See: https://gist.github.com/woganmay/4c15a0f7c16e41ab3a3ea1a73c595bf9 | |
$api_url = sprintf("https://my.flarum.site/api/users/%s/avatar", $user->id); | |
// See: https://gist.github.com/woganmay/88f15e96fc019657a0e594366403b5cf | |
$token = $session->token; | |
$ch = curl_init($api_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
<script type="text/javascript"> | |
var thisHackInterval = setInterval(function(){ | |
// Check if app is available yet | |
if (typeof(app) == "object") | |
{ | |
// Set app routes to whatever I need | |
// This will repaint the DOM automatically | |
app.routes.settings.path = "https://my.laravel.site/preferences"; |