Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
...

Ahmed El Gabri ahmedelgabri

🤔
...
View GitHub Profile
@ahmedelgabri
ahmedelgabri / ANSI.md
Created April 10, 2023 15:44 — forked from fnky/ANSI.md
ANSI Escape Codes
View ANSI.md

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@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.
View vimModeStateDiagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahmedelgabri
ahmedelgabri / default
Last active September 25, 2020 09:00
View default
#
# aerc default styleset
#
# This styleset uses the terminal defaults as its base.
# More information on how to configure the styleset can be found in
# the aerc-styleset(7) manpage. Please read the manual before
# modifying or creating a styleset.
*.default=true
*.selected.reverse=toggle
View VimScriptForPythonDevelopers.MD

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

View ipad-dev.md

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

View md-to-html.js
var unified = require('unified')
var markdown = require('remark-parse')
var remark2rehype = require('remark-rehype')
var html = require('rehype-stringify')
var report = require('vfile-reporter')
unified()
.use(markdown)
.use(remark2rehype)
.use(html)
@ahmedelgabri
ahmedelgabri / about.md
Created March 7, 2020 15:11 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
View about.md
@ahmedelgabri
ahmedelgabri / ts.md
Created July 2, 2019 08:09
global types in Typescript
View ts.md

I'm migrating a legacy codebase to Typescript & it has some global objects attached to window & I want these to be available always.

So I created globals.d.ts file that looks something like this

interface Foo {
  a: string;
  b: number;
}
View gist:38663fc4f7766eccc06c2a3b2a159c17
/usr/bin/sandbox-exec -f /private/tmp/homebrew20181003-80602-18w30bh.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-macho-2.1.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/plist-3.4.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/backports-3.11.4/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/activesupport-5.2.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/tzinfo-1.2.5/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/thread_safe-0.3.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/minitest-5.11.3/lib:/usr/local/Homebrew/Library/Homebrew/
@ahmedelgabri
ahmedelgabri / # weechat - 2018-09-30_14-59-50.txt
Created September 30, 2018 13:01
weechat on macOS 10.14 - Homebrew build logs
View # weechat - 2018-09-30_14-59-50.txt
Homebrew build logs for weechat on macOS 10.14
Build date: 2018-09-30 14:59:50