Skip to content

Instantly share code, notes, and snippets.

org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab']
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8']
org.gnome.desktop.wm.keybindings switch-to-workspace-7 []
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7']
org.gnome.desktop.wm.keybindings move-to-side-w []
org.gnome.desktop.wm.keybindings move-to-corner-nw []
org.gnome.desktop.wm.keybindings move-to-workspace-10 []
org.gnome.desktop.wm.keybindings move-to-workspace-6 []
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Control><Shift><Alt>Right']
org.gnome.desktop.wm.keybindings always-on-top []
#!/usr/bin/perl
# credits:https://askubuntu.com/questions/26056/where-are-gnome-keyboard-shortcuts-stored
use strict;
my $action = '';
my $filename = '-';
for my $arg (@ARGV){
@MattPD
MattPD / analysis.draft.md
Last active November 12, 2024 06:46
Program Analysis Resources (WIP draft)
@mpilquist
mpilquist / big3.scala
Last active September 25, 2019 00:40
Example encoding of Functor / Applicative / Monad using dotty 0.15
/* Example of encoding Functor/Applicative/Monad from cats with Dotty 0.15 features.
* Derived in part from Cats -- see https://github.com/typelevel/cats/blob/master/COPYING for full license & copyright.
*/
package structures
import scala.annotation._
trait Functor[F[_]] {
def (fa: F[A]) map[A, B](f: A => B): F[B]
def (fa: F[A]) as[A, B](b: B): F[B] =
@HenningTimm
HenningTimm / rust_mem_profiling.md
Last active August 27, 2024 11:23
Memory profiling Rust code with heaptrack in 2019
@mrange
mrange / README.md
Last active March 11, 2022 10:02
[F#/OCaml] Implementing a data streams library using a bunch of one-liners

[F#/OCaml] Implementing a data streams library using a bunch of one-liners

A few years ago when I read the presentation motivating the design behind Nessos Streams I was struck by the beauty of simplistic push streams.

type PushStream<'T> = ('T -> bool) -> bool

LINQ (in .NET) is a pull stream, ie we pull values out of the stream by calling MoveNext + Current. One of the problems with pull streams is the constant checking "Are we done?" at each level in the stream.

@ninjarobot
ninjarobot / strace-netcore.md
Last active May 24, 2022 19:22
Trace .NET Core Applications on Linux with `strace`

Trace .NET Core Applications on Linux with strace

Troubleshooting a running application can be difficult, usually it starts around checking log output and then following through the likely code paths to get an idea of where a failure may occur. In a development environment, you might attach a debugger a step through source, but troubleshooting isn't always that convenient. There are several helpful tools that can assist, but one that gives the most comprehensive view of a running application is strace. With strace you are able to see all of the system calls an application makes to get a detailed understanding of what is going on "under the hood" in order to troubleshoot an issue.

Take a simple "hello world" F# application, the kind you get from dotnet new console -lang F# -n strace-sample". Build it with dotnet build and then launch it with strace to get a trace of all the system calls in a file called trace.log(adjusting for your build output path if on a different framework vers

@neomantra
neomantra / High_Performance_Redis.md
Last active October 20, 2024 15:00
Notes on running Redis with HPC techniques

High Performance Redis

In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).

The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.

My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do

void inject_trusts(int pathc, const char *paths[])
{
printf("[+] injecting into trust cache...\n");
extern uint64_t g_kern_base;
static uint64_t tc = 0;
if (tc == 0) {
/* loaded_trust_caches
iPhone11,2-4-6: 0xFFFFFFF008F702C8
@thoughtpolice
thoughtpolice / llvm-static-musl.nix
Created January 11, 2019 00:34
Static C++17 binaries with Clang, Musl, and libc++, using Nix
{ useMusl ? false
}:
let
nixpkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/004cb5a694e39bd91b27b0adddc127daf2cb76cb.tar.gz";
sha256 = "0v5pfrisz0xspd3h54vx005fijmhrxwh0la7zmdk97hqm01x3mz4";
}) {};
pkgs = if useMusl then nixpkgs.pkgsMusl else nixpkgs;