Skip to content

Instantly share code, notes, and snippets.


Pascal Baljet pascalbaljet

View GitHub Profile
ninthspace / Controller.php
Last active Apr 15, 2021
Time travel with Dusk without pesky JavaScript
View Controller.php
// update Controller.php as follows
namespace App\Http\Controllers;
use App\Services\TimeTravel;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
tonysm / concurrent-pool.php
Last active Jul 18, 2021
Concurrent Requests
View concurrent-pool.php
// 1. Register the routes
Route::get('test/{lorem}', function ($lorem) {
return response()->json([
'message' => $lorem,
'token' => Str::random(),
View node_hot_reload.js
const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
calebporzio / fa.sublime_snippet
Last active Apr 8, 2018
Font Awesome sublime snippet for creating icon tags
View fa.sublime_snippet
<i class="fa fa-fw fa-${1}"></i>&nbsp;
<description>Font Awesome Icon</description>
<scope>text.blade, text.html.blade, text.html</scope>
ftvs /
Last active Oct 15, 2021
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: Gabe Sechan Explanation:
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
mekya /
Created Jan 30, 2015
GoPro Hero4 Silver - Live Preview on PC (java, ffplay, ffmpeg)
import java.util.Locale;
jareware /
Last active Oct 23, 2021
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso