Skip to content

Instantly share code, notes, and snippets.

View johnadan's full-sized avatar

John McLem Adan johnadan

View GitHub Profile
@ryansechrest
ryansechrest / a.md
Last active January 23, 2024 06:20
Tech Interview & Resume Tips
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active July 16, 2025 09:59
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!


Update 2025-07-16: Use either Revanced, NewPipe or Firefox with add-ons. Revanced is my personal pick, due to it being a mod of the official App like Vanced, but better (e.g. it has integration of Sponsor Block, Return YouTube Disklike and more).

I wouldn't recommend Kiwi Browser anymore as it has been discontinued. AFAIK it has been accuired by Microsoft and the extension support has been merged into Edge (Canary). But you'd have to use Edge. Yuck.


/* Example using caching */
import { ExpirationPlugin } from 'workbox-expiration';
import { precacheAndRoute } from 'workbox-precaching';
import { registerRoute } from 'workbox-routing';
import { StaleWhileRevalidate } from 'workbox-strategies';
// Inject workbox in Service Worker
precacheAndRoute(self.__WB_MANIFEST);
// Enable navigation preload (work in Chrome)
@DanCanetti
DanCanetti / _form.scss
Last active March 15, 2021 05:20
Inline Google Recaptcha and parsley.js form validation
.FORM_CLASS {
// Form styles
&--complete {
#submitForm {
position: relative;
&::after {
content: "";
position: absolute;
z-index: 100;
cursor: not-allowed;
@KonstantinBozhkov
KonstantinBozhkov / caching-sw.js
Created November 6, 2020 12:50
Examples sw.js
/* Example using caching */
import { ExpirationPlugin } from 'workbox-expiration';
import { precacheAndRoute } from 'workbox-precaching';
import { registerRoute } from 'workbox-routing';
import { StaleWhileRevalidate } from 'workbox-strategies';
// Inject workbox in Service Worker
precacheAndRoute(self.__WB_MANIFEST);
// Enable navigation preload (work in Chrome)
@cedrickchee
cedrickchee / clean_code.md
Last active June 14, 2025 13:17 — forked from wojteklu/clean_code.md
Summary of "Clean Code" by Robert C. Martin

Summary of "Clean Code" by Robert C. Martin

A summary of the main ideas from the "Clean Code: A Handbook of Agile Software Craftsmanship" book by Robert C. Martin (aka. Uncle Bob).

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

@jtelesforoantonio
jtelesforoantonio / ApiResponse.php
Last active July 21, 2024 08:40
Trait API Responses for Laravel
<?php
namespace App\Traits;
use Illuminate\Http\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
trait ApiResponses
{
/**
@souhaiebtar
souhaiebtar / dbeaver.ini
Last active February 21, 2025 13:35
[dbeaver config file] .ini file for dbeaver #dbeaver #linux
# path on linux /usr/share/dbeaver/dbeaver.ini
# path on macos /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini
-vm
/usr/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-vmargs
-javaagent:/home/tunknown/.apps/dbeaver/dbeaver-agent.jar
@aslamdoctor
aslamdoctor / laravel-json-orderby.php
Created November 27, 2019 06:25
Laravel : Maintain Sort order in JSON Response
<?php
$user = $request->user();
$submissions = $user->submissions;
// do these in the end
$submissions = $submissions->sortByDesc(function($submission){
return $submission->created_at;
});
$submissions = array_values($submissions->toArray());
@Jonarod
Jonarod / CheckBox.vue
Created November 23, 2019 18:20
Simple custom CheckBox component for Vue.js, compatible with v-model.
/**
* @usage:
*
* <CheckBox label="Foo" value="foo" v-model="MySelectedValues" />
* <CheckBox label="Bar" value="bar" v-model="MySelectedValues" />
* <CheckBox label="Baz" value="baz" v-model="MySelectedValues" />
*
* data(){
* return {
* MySelectedValues: [],