Skip to content

Instantly share code, notes, and snippets.

View Grafikart's full-sized avatar
🏠
Working from home

Jonathan Grafikart

🏠
Working from home
View GitHub Profile
@Grafikart
Grafikart / Grafikart.google
Last active August 25, 2022 09:16
Brave search goggle
! name: Grafikart
! description: Rerank results to remove unaccessible content.
! public: true
! author: Grafikart
! avatar: #4869ee
! https://search.brave.com/goggles/create?nav=site
! Boost docs
$boost=3,site=developer.mozilla.org
@Grafikart
Grafikart / index.html
Created August 11, 2022 21:53
CSSBattle
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSSBattle canvas</title>
<style>
:root {
@Grafikart
Grafikart / AppServiceProvider.php
Created August 25, 2022 08:07
Laravel SQL Log
<?php
// Ajouter ce code dans boot()
if ($this->app->isLocal() && ($_SERVER['PHP_SELF'] ?? null) !== 'artisan') {
$k = 0;
\Illuminate\Support\Facades\DB::listen(function (\Illuminate\Database\Events\QueryExecuted $q) use (&$k) {
$k++;
file_put_contents('php://stdout', "[{$k}] \e[34m{$q->sql}\t\e[37m]".json_encode($q->bindings)."\t\e[32m{$q->time}ms\e[0m\n");
});
}
[
{
"key": "alt+1",
"command": "multiCommand.makeRoom"
},
{
"key": "ctrl+d",
"command": "editor.action.smartSelect.expand",
"when": "editorTextFocus"
},
@Grafikart
Grafikart / jsr.js
Created August 24, 2023 08:38
jetsetradio.live downloader (nodejs)
import {chromium, devices} from 'playwright';
import ora from 'ora';
import inquirer from 'inquirer'
import {createWriteStream} from 'node:fs'
import {mkdir} from 'node:fs/promises'
import {get} from 'node:https'
/**
* Download music from jetsetradio.live
*