Skip to content

Instantly share code, notes, and snippets.

View johnadan's full-sized avatar
👨‍💻
Back in the office!

John McLem Adan johnadan

👨‍💻
Back in the office!
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 April 2, 2024 08:21
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!

These are the current alternatives (with links when possible):

/* 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 March 19, 2024 09:30 — 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 June 25, 2023 19:56
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 April 19, 2024 13:48
[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
-XX:+IgnoreUnrecognizedVMOptions
@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: [],