Skip to content

Instantly share code, notes, and snippets.

View elliotlings's full-sized avatar

Elliot Lings elliotlings

View GitHub Profile
@elliotlings
elliotlings / pre-request.js
Created October 4, 2023 23:24
Laravel Sanctum Postman Pre-request Login Script
let token = pm.environment.get('token');
if (! token) {
let email = pm.environment.get('email');
let password = pm.environment.get('password');
let loginRequest = {
url: loginUrl = pm.environment.get('url') + '/api/login',
method: 'POST',
headers: {
@elliotlings
elliotlings / Ecwid.js
Created March 16, 2023 17:01
Salesfire tracking code for Ecwid
;(function() {
var found = false;
var giveUp = false;
function find() {
if (found || giveUp) {
return;
}
if (window._swOTP) {
@elliotlings
elliotlings / gist:7629783
Created November 24, 2013 17:24
Custom Laravel 4 asset function for static subdomain.
<?php
function asset($path, $secure = null)
{
if (app('url')->isValidUrl($path)) return $path;
if (is_null($secure))
{
$scheme = app('url')->getRequest()->getScheme($secure) . '://';
Test
Test