Skip to content

Instantly share code, notes, and snippets.

@jpswade
jpswade / SqliteTrait.php
Created August 1, 2021 10:35
Laravel - no such function: CONCAT sqlite
<?php
namespace App\Traits;
use Illuminate\Database\SQLiteConnection;
use Illuminate\Support\Facades\DB;
trait SqliteTrait
{
protected static function setUpSqlite(): void
@kaleksandrov
kaleksandrov / global-protect.sh
Last active April 19, 2024 03:46
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@biosmanager
biosmanager / userChrome.css
Last active January 27, 2024 13:12
Firefox Proton macOS Close Tab Left (updated for version 113)
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tabbrowser-tab .tab-close-button {
opacity: 0;
margin-left: -4.5px !important;
margin-right: 2px !important;
}
.tabbrowser-tab:not(:hover) .tab-close-button {
display: none;
@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@eimg
eimg / pdo-wrapper.php
Last active November 29, 2022 11:20
Simple yet secure PHP PDO database wrapper with CRUD methods...
<?php
# PDO Wrapper, supporting MySQL and Sqlite
# Usage:
# $db = new db();
#
# // table, data
# $db->create('users', array(
# 'fname' => 'john',
# 'lname' => 'doe'
# ));