Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active May 9, 2024 04:58
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if UNITY_EDITOR
using Mono.Cecil;
using Mono.Cecil.Cil;
public static class ByRefGen {
public static void RemoveByRefType(string src, string dst) {
ModuleDefinition moduleDefinition = AssemblyDefinition.ReadAssembly(src).MainModule;
@lindig
lindig / dir.ml
Last active May 9, 2024 04:54
OCaml - list recursively regular files in a directory
(** [dir_is_empty dir] is true, if [dir] contains no files except
* "." and ".."
*)
let dir_is_empty dir =
Array.length (Sys.readdir dir) = 0
(** [dir_contents] returns the paths of all regular files that are
* contained in [dir]. Each file is a path starting with [dir].
@thimslugga
thimslugga / 01-setup_docker_al2023.md
Last active May 9, 2024 04:54
Setup Docker and docker-compose on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

Steps to Install and Setup Docker on Amazon Linux 2023

Install the packages

Install the following packages, which are good to have installed:

sudo dnf install --allowerasing -y dnf-plugins-core \
/*
* Module Name:
* WorkingSetWatch.cpp
*
* Abstract:
* Tracks page faults that occur within the process.
*
* NOTE: This is not compatible with Wow64 and must be run as a 64-bit
* program on x64 and a 32-bit program on x86.
*

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@peterwsetter
peterwsetter / side-by-side-tables.Rmd
Last active May 9, 2024 04:50
Side-by-side Tables in Rmarkdown
---
output: pdf_document
---
```{r results='asis', echo=FALSE}
# Setting `results = 'asis'` allows for using Latex within the code chunk
cat('\\begin{center}')
# `{c c}` Creates a two column table
# Use `{c | c}` if you'd like a line between the tables
cat('\\begin{tabular}{ c c }')
print(knitr::kable(mtcars[1:5, 1:5], format = 'latex'))
@salhernandez
salhernandez / InstallingMeld.md
Last active May 9, 2024 04:49 — forked from kjlubick/InstallingMeld
How to install Meld on Windows and getting it set up with Git

Install Meld from their webpage http://meldmerge.org/

I had to tell git where it was:

git config --global merge.tool meld git config --global diff.tool meld

If using windows 8 and 10 use the following git config --global mergetool.meld.path "/c/Program Files (x86)/meld/meld.exe" git config --global difftool.meld.path "/c/Program Files (x86)/meld/meld.exe"

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 9, 2024 04:48
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux