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 | |
// Ugly as sin, but gets the latest version URL for the app.js file | |
// The Vue app will query this every 60 seconds | |
Route::get('/version', function(){ | |
$manifest = file_get_contents(public_path('mix-manifest.json')); | |
$manifest = json_decode($manifest); | |
return response()->json([ | |
'latest' => $manifest->{'/js/app.js'} | |
]); |
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
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('My Business') | |
.addItem('Refresh Timesheets', 'getTimesheets') | |
.addToUi(); | |
} | |
function getTimesheets() { | |
// Read API token and Workspace ID from Configuration tab |
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
// 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 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 | |
function onStart() | |
{ | |
$flow = curl_init("https://prod-22.westeurope.logic.azure.com:443/..."); | |
curl_setopt($flow, CURLOPT_RETURNTRANSFER, TRUE); | |
curl_setopt($flow, CURLOPT_POST, TRUE); | |
curl_setopt($flow, CURLOPT_HTTPHEADER, [ | |
'Content-Type: application/json' |
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 | |
namespace App\Http\Controllers; | |
use App\Http\Requests; | |
use Illuminate\Http\Request; | |
use App\Jobs\SendOpened; | |
class PixelController extends Controller |
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
(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 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 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 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 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" => [ |