Skip to content

Instantly share code, notes, and snippets.

@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 11, 2024 08:56
Swift Concurrency Manifesto

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@nadavrot
nadavrot / Matrix.md
Last active May 8, 2024 18:53
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@seanjensengrey
seanjensengrey / octal_x86.txt
Created April 1, 2018 16:28
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@olilarkin
olilarkin / notes.md
Last active March 13, 2024 08:33
Plugin Dev Notes
@HarshaVardhanBabu
HarshaVardhanBabu / Instructions_UML_Python.rst
Last active December 19, 2023 13:48
Generating UML diagrams in python using pyreverse

Requirements

  1. Install Pylint from Install. If you have anaconda already installed use pip install -U pylint to update the Pylint so that pyreverse is added to the scripts folder.
  2. You need to install Graphviz as the pyreverse generates the UML diagrams in dot format and needs the dot.exe provided by Graphviz. Once Graphviz is installed make sure the bin folder is added to the PATH variable so that pyreverse can find it at run time. "the command pyreverse generates the diagrams in all formats that graphviz/dot knows." (Reference
  3. Now add the path of python modules for which you want to generate the documentation to PYTHONPATH.
  4. Use pyreverse -S <modulename> to generate dot files in the current folder

    Usage:

@remarkablemark
remarkablemark / README.md
Last active November 12, 2023 07:52
Classes - ES5 vs ES6

JavaScript Classes - ES5 vs ES6

An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.

Reference