Skip to content

Instantly share code, notes, and snippets.

View ahmedelgabri's full-sized avatar
🤔
...

Ahmed El Gabri ahmedelgabri

🤔
...
View GitHub Profile
@ahmedelgabri
ahmedelgabri / cicada.css
Created June 9, 2011 18:24 — forked from Zoramite/cicada.css
Cicada + CSS Backgrounds
.example1 {
background-color: #efefef;
background-image: -webkit-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -webkit-linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%), -webkit-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%), -webkit-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image: -moz-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%), -moz-linear-gradient(0, rgba(168,137,73,.17) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image: -o-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -o-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%), -o-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%), -o-linear-gradient(0, rgba(99,78,60,.19) 50%, transparent 50%);
background-image: linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), linear-gradient(0, rgba(201
function getDominantColor(aImg) {
let canvas = document.createElement("canvas");
canvas.height = aImg.height;
canvas.width = aImg.width;
let context = canvas.getContext("2d");
context.drawImage(aImg, 0, 0);
// keep track of how many times a color appears in the image
let colorCount = {};
# From http://sass-guidelin.es/
# For SCSS-Lint v0.31.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
@ahmedelgabri
ahmedelgabri / about.md
Created March 7, 2020 15:11 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer

Essential Apps

  • Blink: Install Blink on your iPad
  • Tailscale: Install Tailscale on all your devices.
  • mosh: Install mosh on all your devices. It comes with Blink by default.

Nice to have apps

Amphetamine for Mac

Vim Script for Python Developers

A guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with programming in Python.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a similar guide for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, key-mapping, [abbrevi

@ahmedelgabri
ahmedelgabri / vimModeStateDiagram.svg
Created March 28, 2021 15:22 — forked from darcyparker/vimModeStateDiagram.svg
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahmedelgabri
ahmedelgabri / ANSI.md
Created April 10, 2023 15:44 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ahmedelgabri
ahmedelgabri / falsehoods-programming-time-list.md
Created March 3, 2024 14:22 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@ahmedelgabri
ahmedelgabri / README.md
Created March 13, 2024 09:03 — forked from lawrencejones/README.md
Produce build telemetry from a MacBook

MacBook system information

You can run this script in order to extract various runtime and system measurements from a MacBook that might be relevant to performance.

This is a sample output:

{
  "id": "3d0f3c61-480e-4ace-9a65-c6e09ffd2dbd",
 "timestamp": "2023-12-12T19:38:27.013103Z",