Skip to content

Instantly share code, notes, and snippets.

@AllenDang
AllenDang / gccemacs.md
Last active August 15, 2023 15:45
Build gccemacs on MacOS catalina with gcc 10 installed by homebrew.
@krasnovpro
krasnovpro / Create_IsoCam.py
Created February 10, 2019 11:26
Creates a true isometric camera in blender
# This script creates two kinds of isometric cameras.
#The one, TrueIsocam called camera, is the mathematical correct isometric camera with the 54.736 rotation to get the 30 degrees angles at the sides of the rhombus.
#The other, GameIsocam called camera, is a camera with which you can render isometric tiles for a 2d game. Here we need a 60 degrees angle instedad of the 54.736 one to get a proper stairs effect and a ratio of 2:1
# Then there is the special case with a 4:3 ratio, which is button 3. You can also make 2D games with that one. The view is more topdown though as with a 2:1 ratio of the traditional game iso view.
# The fourth button creates a simple groundplane where you can place your stuff at.
#You can of course set up everything by hand. This script is a convenient solution so that you don't have to setup it again and again.
# The script is under Apache license
@tjvr
tjvr / crypttab
Last active March 13, 2024 17:06
Hibernate on Ubuntu 18.04 with LVM full-disk encryption
sda5_crypt UUID=c66880c1-c2f1-40fc-9580-f25d493876ef none luks,discard
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@miguelmota
miguelmota / logrus_hooks.go
Last active September 7, 2021 07:27
Golang Logrus show filename and line number
package logger
import (
"fmt"
"path"
"runtime"
"github.com/sirupsen/logrus"
)
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active May 10, 2024 13:04
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@t4sk
t4sk / script-p2pkh.md
Last active March 29, 2022 17:02
How to create scriptPubKey for P2PKH

How to create scriptPubKey for P2PKH

1. Get public key hash

Get the public key hash by computing OP_HASH160 of public key

In this example:

  • public key: 033e8c5dcb8e35670de496b57c1fa4366800ce3be5fded9b8800759881bc8da2e5
  • public key hash: 60d47ac02b129c08f94232ea506d1826424fe7be
@t4sk
t4sk / hash160.md
Last active June 26, 2023 20:20
How to compute OP_HASH160 of public key

How to compute OP_HASH160 of public key

OP_HASH160 of public key = RIPEMD160(SHA256(ECDSA_publicKey))

1. Generate address

> getnewaddress
mpLwhoaRWxfgdQAz8JnnH7NUuhS157DM61

2. Get public key

@kylemanna
kylemanna / arch-linux-install.md
Last active April 19, 2023 04:40 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
@subfuzion
subfuzion / README.md
Last active April 11, 2024 14:52
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,