Skip to content

Instantly share code, notes, and snippets.

View KABBOUCHI's full-sized avatar
🎯
Focusing

Georges KABBOUCHI KABBOUCHI

🎯
Focusing
View GitHub Profile
@KABBOUCHI
KABBOUCHI / AVOCADO.md
Last active September 4, 2023 14:55
Instadapp - Avocado Multisig

Setup

import { ethers } from "ethers" // ethers@v5
import multisigForwarderABI from "./multisigForwarder.json"
import avoMultisigSafeABI from "./avoMultisigSafe.json"

const avocadoProvider = new ethers.providers.JsonRpcProvider("https://rpc.avocado.instadapp.io")
const polygonProvider = new ethers.providers.JsonRpcProvider("https://polygon-rpc.com")
[
{
"component": "Header",
"props": {
"class": "text-red-400 text-lg",
"content": "Testing!"
}
},
{
"component": "Card",
@KABBOUCHI
KABBOUCHI / webpack.mix.js
Created October 29, 2020 15:56 — forked from thecrypticace/webpack.mix.js
Mix + custom API for separate builds
const mix = require("laravel-mix")
mix.site = (id, callback) => {
if (!process.env.SITE || process.env.SITE === id) {
return callback()
}
};
mix.site('admin', () => {
mix.js("resources/js/admin/app.js", "public/js/admin.js")
@KABBOUCHI
KABBOUCHI / AppServiceProvider.php
Last active October 5, 2020 20:02
Inertia - Evaluate lazy props only if requested
<?php
namespace App\Providers;
use App\Inertia\ResponseFactory;
use Illuminate\Support\ServiceProvider;
use Inertia\ResponseFactory as InertiaResponseFactory;
class AppServiceProvider extends ServiceProvider
{
@KABBOUCHI
KABBOUCHI / SmoothGameCameraMovement.cs
Created January 21, 2020 20:25 — forked from IRCSS/SmoothGameCameraMovement.cs
Unity Camera Movement in Game view like Scene View with filtering
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move.
public class SmoothGameCameraMovement : MonoBehaviour
{
@KABBOUCHI
KABBOUCHI / .php_cs.laravel.php
Created January 8, 2020 19:43 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]
@KABBOUCHI
KABBOUCHI / axios.js
Created November 6, 2019 19:57 — forked from wooooodward/axios.js
Axios plugin example with request interceptor that adds JWT token to the auth header and 401 response interceptor to refresh token
import Vue from 'vue'
import axios from 'axios'
import store from '../store'
import { TokenService } from '../services/storage.service'
// Full config: https://github.com/axios/axios#request-config
let config = {
baseURL:
process.env.baseURL ||
@KABBOUCHI
KABBOUCHI / default.conf
Created November 6, 2019 09:35 — forked from vladkras/default.conf
NGINX redirect to app store and google play based on user agent
location = /gotoapp {
if ($http_user_agent ~* "iphone|ipod|ipad|appletv") {
return 301 https://www.apple.com/lae/ios/app-store/;
}
if ($http_user_agent ~* "android") {
return 301 https://play.google.com/store;
}
if ($http_user_agent ~* "Windows") {
return 301 https://www.microsoft.com/store/apps?rtc=1;
@KABBOUCHI
KABBOUCHI / DateInput.vue
Created September 18, 2019 18:11 — forked from reinink/DateInput.vue
Pikaday Vue Component
<template>
<div>
<label v-if="label" class="form-label" :for="`date-input-${_uid}`">{{ label }}:</label>
<input v-bind="$attrs" class="form-input" :id="`date-input-${_uid}`" :class="{ error: error }" type="text" ref="input" :value="value" @change="change" @keyup="change">
<div v-if="error" class="form-error">{{ error }}</div>
</div>
</template>
<script>
import pikaday from 'pikaday'