Skip to content

Instantly share code, notes, and snippets.

View munael's full-sized avatar

Muhammad N ElNokrashy munael

View GitHub Profile
@Starefossen
Starefossen / tmux-cheats.md
Last active July 20, 2024 15:33
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@simonista
simonista / .vimrc
Last active July 21, 2024 14:41
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@evincarofautumn
evincarofautumn / InlineDoBind.md
Last active April 20, 2023 21:16
Thoughts on an InlineDoBind extension

Thoughts on an InlineDoBind extension

An expression beginning with a left arrow (<-) inside a do block statement is desugared to a monadic binding. This is syntactically a superset of existing Haskell, including extensions. It admits a clean notation that subsumes existing patterns and comes with few downsides.

Examples

do
  f (<- x) (<- y)
-- ===
@anj1
anj1 / subexpr.py
Last active January 20, 2020 22:41
import types
import tensorflow as tf
import numpy as np
# Expressions are represented as lists of lists,
# in lisp style -- the symbol name is the head (first element)
# of the list, and the arguments follow.
# add an expression to an expression list, recursively if necessary.
def add_expr_to_list(exprlist, expr):
@patik
patik / styles.css
Last active April 20, 2024 06:59 — forked from joshbode/numbered_headings.md
Numbered Headings in Markdown via CSS
body { counter-reset: h1counter h2counter h3counter h4counter h5counter h6counter; }
h1 { counter-reset: h2counter; }
h2 { counter-reset: h3counter; }
h3 { counter-reset: h4counter; }
h4 { counter-reset: h5counter; }
h5 { counter-reset: h6counter; }
h6 {}
h2:before {
@buserror
buserror / clock.c
Created February 2, 2017 16:27
protothreads, aka duff's device in use...
/*
*
* Ascii art http://www.network-science.de/ascii/ (font "mini")
*
* -Wall -g -Os -std=gnu99 -mcall-prologues -DF_CPU=8000000
* 8366 118 1373 9857 2681 atmega644_sure_led_clock.axf
*
* -mcall-prologues -fno-inline-small-functions \
* -ffunction-sections -fdata-sections \
* -Wl,--relax,--gc-sections \
@snoyberg
snoyberg / Main.hs
Last active April 27, 2021 15:10
Comparing iterators, streams, and loops in Haskell, Rust, and C
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE TypeFamilies #-}
module Main (main) where
import Foreign
import Foreign.C.Types
@honix
honix / let.red
Last active September 5, 2017 15:24
Red []
let: func [
binds
block
/local
ctx
][
ctx: context append/only append binds copy [result: do] block
select ctx 'result
import re
import os
import glob
import pandas as pd
import matplotlib.pyplot as plt
from collections import OrderedDict
fig_size = [12, 9]