Skip to content

Instantly share code, notes, and snippets.

View matthewjberger's full-sized avatar

Matthew J. Berger matthewjberger

View GitHub Profile
@rowillia
rowillia / python3kflag.md
Last active December 7, 2016 21:45
The Magic of the -3 Flag in Python 2

The Magic of the -3 Flag in Python 2

Porting code from Python 2 to Python 3 can be a daunting task. Tools like Futureize or Modernize can do most of the mechanical work for you, and Pylint can find obvious problems with code that's meant to be 2and3 compatible. You should absolutely be using these tools as they identify the lion's share of compatibility problems. Thanks to this work, it's really never been easier to port a large codebase to Python 3.

Even with these tools, however, porting code in a way that ensures identical behavior in Python 2 and Python 3 is tough. Python is a highly dynamic language and there is a huge breadth of changes between Python 2 and Python 3. Also, while we'd all love to work in code bases with 100% unit test coverage, the reality is unfortunately often very different. Given this, it's hard if not impossible for a static analysis tool t

@TheFrostlixen
TheFrostlixen / Rainmeter.ini
Last active March 28, 2019 04:17
My Windows configuration -- Rainmeter & AutoHotKey scripts
[Rainmeter]
SkinPath=C:\Users\fredrickson_m\Documents\Rainmeter\Skins\
Logging=1
ConfigEditor=C:\Program Files (x86)\Notepad++\notepad++.exe
;-----------------------
; META
;-----------------------
; BARS
[Enigma\Sidebar]
Active=1
@wolfiestyle
wolfiestyle / 01_animals.cpp
Created August 10, 2016 04:42
the classic Animal class example in C++ and Rust
// the OOP version in C++
#include <iostream>
// base abstract class. that is what we use as the interface
class Animal
{
public:
Animal(char const* name): m_name(name) {}
// this is required to properly delete virtual classes
@iwalpola
iwalpola / stm32_gpio_reg.md
Last active May 2, 2024 08:40
STM32 GPIO registers cheatsheet
@maorv
maorv / create_neovim_qt_deb.sh
Last active March 23, 2021 19:21
Install neovim-qt on ubuntu
#!/bin/sh
echo "Install neovim from ppa"
sudo add-apt-repository -y ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install -y neovim
sudo apt install qt5-default libqt5widgets5
echo "Compile and install neovim-qt"
git clone https://github.com/maorv/neovim-qt.git
@zarzen
zarzen / spacemacs-cpp.md
Last active January 23, 2024 13:06
C++ development environment setup in Spacemacs
* root topic - TAB and S-TAB to toggle folding
** child topic
child topic text
*** leaf topic:
some text blah
blah
blah
*** another leaf topic:
# test table - TAB to cycle through columns, M-e to move point to end of cell
@squarism
squarism / iterm2.md
Last active May 4, 2024 13:06
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@TheBB
TheBB / loading.org
Last active June 22, 2023 11:53
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the