Skip to content

Instantly share code, notes, and snippets.

View djoudi's full-sized avatar
🌍
Remotely Work

Abdelouahab Djoudi djoudi

🌍
Remotely Work
View GitHub Profile
@djoudi
djoudi / serila numbers vmwar 15 pro
Created May 30, 2020 22:01 — forked from Solo-24/serila numbers vmwar 15 pro
Vmwar Workstation 15 Pro Serila Keys
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
@djoudi
djoudi / 000-HAproxy-Varnish-Apache-Wordpress-Letsencrypt
Created April 27, 2020 14:16 — forked from sys0dm1n/000-HAproxy-Varnish-Apache-Wordpress-Letsencrypt
HAproxy, Varnish and Apahce configuration files compatible for Wordpress with Apache webserver with Let's Encrypt
Configuration files to setup Wordpress with Apache2 webserver, Varnish caching server and HAproxy for loadbalancing with support for Lets Encrypt
@djoudi
djoudi / Kernel.php
Created March 22, 2020 07:56 — forked from ciamarro/Kernel.php
Maintain localization / locale when using Laravel Livewire
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
//----
@djoudi
djoudi / MyRecyclerViewAdapter.kt
Created December 28, 2019 01:43 — forked from cesarferreira/MyRecyclerViewAdapter.kt
DiffUtils kotlin extension
class DeliveryWindowsAdapter : RecyclerView.Adapter<DeliveryWindowsAdapter.ViewHolder>() {
var items: List<DeliveryWindowUiModel> by Delegates.observable(emptyList()) { _, oldList, newList ->
autoNotify(oldList, newList) { o, n -> o.id == n.id }
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val deliveryWindow = items[position]
holder.title.text = deliveryWindow.title
holder.price.text = deliveryWindow.friendlyPrice
@djoudi
djoudi / gradle.properties
Created December 28, 2019 01:39 — forked from cesarferreira/gradle.properties
Global Gradle Properties
# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
org.gradle.daemon=true
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
@djoudi
djoudi / build.gradle
Created December 28, 2019 01:39 — forked from cesarferreira/build.gradle
Skip lint check
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
}
@djoudi
djoudi / axios_to_fetch.js
Last active May 1, 2024 10:03 — forked from mp035/axios_to_fetch.js
Replace axios requests with fetch interface.
//This adds axios.get, axios.post, axios.put, and axios.delete compatible methods to
//the global namespace. It is intened for json transactions.
let token = document.head.querySelector('meta[name="csrf-token"]');
class HTTPError extends Error {
constructor(response, ...params) {
// Pass remaining arguments (including vendor specific ones) to parent constructor
super(...params);
@djoudi
djoudi / nginx.conf
Created October 5, 2019 11:27 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@djoudi
djoudi / Example.js
Created September 24, 2019 17:23 — forked from vaibhavpandeyvpz/Example.js
Laravel, Axios & Logout Over AJAX
import React from 'react';
import ReactDOM from 'react-dom';
const handleLogout = () => {
axios.post('/logout')
.then(() => location.href = '/home')
};
function Example() {
return (
@djoudi
djoudi / checkbox.blade.php
Created July 20, 2019 15:39 — forked from skadimoolam/checkbox.blade.php
Customizable form partials for Laravel - https://laravelcollections.com
@php
$d = $d ?? null; // default value
@endphp
<div class="form-group row">
<label for="{{ $n }}" class="col-sm-4 col-form-label text-md-right"><b>{{ $l }}</b></label>
<div class="col-md-8">
<input id="{{ $n }}" type="checkbox" class="form-control" name="{{ $n }}" value="1" @if(old($n, $d) == '1') checked @endif>
@if ($errors->has($n))
<small class="text-danger">{{ $errors->first($n) }}</small>