Skip to content

Instantly share code, notes, and snippets.

View yacinebenkaidali's full-sized avatar
💻

BENKAIDALI Yacine yacinebenkaidali

💻
View GitHub Profile
@MasoudRawahi
MasoudRawahi / PhazeRo's guide to meetings that aren't painful.md
Last active August 25, 2021 06:04
PhazeRo's guide to meetings that aren't painful

PhazeRo's guide to meetings that aren't painful

Do you hate meetings? I feel your pain, because despite my energy and my optimism, I know too well that most meetings are inefficient at best, and more often than not, they seem to be deployed as a form of mental torture. In an ideal world, you would be able to invoke the Geneva Convention and expect international help.But since we live in a very imperfect world, I am giving you the second best thing, which is a guide on having meeting that do not suck.

The Pain

Most meetings induce suffering because they don't achieve anything. They include too many people who have nothing to do with the topic being discussed. Or they don't include key people who are necessary to make a decision. They don't start on time, and then they drag on and on until victims collapse and beg for mercy. It doesn't have to be this way.

The Goal

@gaearon
gaearon / MyResponsiveComponent.js
Created November 1, 2018 10:05
Examples from "Making Sense of React Hooks"
function MyResponsiveComponent() {
const width = useWindowWidth(); // Our custom Hook
return (
<p>Window width is {width}</p>
);
}
@diogocapela
diogocapela / moment-js-timezones.txt
Created September 7, 2018 00:10
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@metafeather
metafeather / main.go
Created April 27, 2017 13:06
Get goroutine id for debugging
# ref: https://play.golang.org/p/OeEmT_CXyO
package main
import (
"fmt"
"runtime"
"strconv"
"strings"
"sync"
)
@fiskurgit
fiskurgit / QuickHullLatLng.java
Last active January 9, 2021 12:07
Convex Hull method using LatLng in a single pass instead of converting to points and back, for a set with 585 coords, time is 4ms versus 66ms
package fisk.convexhull;
import com.google.android.gms.maps.model.LatLng;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class QuickHullLatLng {
public ArrayList<LatLng> quickHull(List<LatLng> points) {
@philipstanislaus
philipstanislaus / sane-caching.nginx.conf
Last active April 11, 2024 03:35
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@mreschke
mreschke / nginx.conf
Last active February 18, 2024 04:41
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
@felixyz
felixyz / Intro to Common Table Expressions.md
Last active December 22, 2023 12:23
Introduction to transitive closure / Common Table Expressions / iterative queries in SQL

Teh Social Netswork!

CREATE TABLE users (
 id SERIAL PRIMARY KEY,
 name VARCHAR(10) NOT NULL
);

INSERT into users VALUES