Skip to content

Instantly share code, notes, and snippets.

@Chimrod
Chimrod / wordle.ml
Created January 13, 2022 20:31
Wordle solver
type filter =
| Lenght of int
| Contain of char * int option
| NotContain of char * int option
(** Represent a decision rule *)
let format_filter : Format.formatter -> filter -> unit =
fun formatter f ->
match f with
| Lenght l -> Format.fprintf formatter "Doit etre de longueur %d" l
@imthenachoman
imthenachoman / README.rst
Last active July 26, 2023 05:47 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as

@blackcater
blackcater / diagrams.md
Created July 6, 2018 16:45
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@staaldraad
staaldraad / awk_netstat.sh
Last active May 9, 2024 01:14
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){
@ernstki
ernstki / sshconfig.php
Last active November 1, 2020 15:33
GeSHi syntax for ~/.ssh/config
<?php
/*************************************************************************************
* sshconfig.php
* --------
* Author: Kevin Ernst (kevin.ernst -at- cchmc.org)
* Copyright: (c) 2017 Kevin Ernst
* Release Version: 1.0.9.1
* Date Started: 2017/12/01
*
* OpenSSH config file (~/.ssh/config) language file for GeSHi.
@lgg
lgg / readme.md
Last active May 2, 2024 20:14
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.

@rayantony
rayantony / dillinger.md
Last active December 15, 2023 03:11
Markdown Cheat Sheets Multi Platform

Dillinger

N|Solid

Dillinger is a cloud-enabled, mobile-ready, offline-storage, AngularJS powered HTML5 Markdown editor.

  • Type some Markdown on the left
  • See HTML in the right
  • Magic

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@m93a
m93a / .XCompose
Last active August 26, 2023 08:44
Unicode emoticons for Compose key
# Emoji
# http://unicode.org/emoji/charts/full-emoji-list.html
<Multi_key> <e> <m> <o> <colon> <D> : "😀"
<Multi_key> <e> <m> <o> <x> <D> : "😁"
<Multi_key> <e> <m> <o> <x> <apostrophe> <D> : "😂"
<Multi_key> <e> <m> <o> <colon> <apostrophe> <D> : "😂"
<Multi_key> <e> <m> <o> <r> <o> <f> <l> : "🤣"
<Multi_key> <e> <m> <o> <colon> <d> : "😃"
<Multi_key> <e> <m> <o> <x> <parenright> : "😄"