Skip to content

Instantly share code, notes, and snippets.

Avatar

Kent Kawashima kentwait

View GitHub Profile
@basoro
basoro / proxmox-proxy
Created May 25, 2019
Running Proxmox behind a single IP address
View proxmox-proxy
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@gaearon
gaearon / modern_js.md
Last active May 16, 2022
Modern JavaScript in React Documentation
View modern_js.md

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@gretzky
gretzky / macOS x arch linux
Last active Oct 14, 2021
dual booting arch linux on a macbook pro 12,1 (retina, 13", 2015)
View macOS x arch linux
#####################################################
# dual booting arch linux & macOS
# on a macbook pro 12,1
# ft. rEFInd
#
# this guide has been smashed together from a variety
# of other awesome guides out there for dual booting
# including but not limited to:
# mark nichols' 5 part guide: https://zanshin.net/2015/02/05/arch-linux-on-a-macbook-pro-part-1-creating-a-usb-installer/
# the arch linux docs: https://wiki.archlinux.org/index.php/mac#Arch_Linux_with_OS_X_or_other_operating_systems
@streslab
streslab / Headless_Ethereum_Ubuntu_16.04.md
Last active Apr 4, 2022
Headless NVIDIA overclock setup under Ubuntu Server 16.04 for ethereum mining
View Headless_Ethereum_Ubuntu_16.04.md

Headless Ethereum Miner Setup - NVIDIA

Reed Slaby, March 2018

Having grown tired of wasting a perfectly good monitor on my ethereum mining rig, I finally decided to replace the Ubuntu Desktop 16.04 installation with Ubuntu Server 16.04. Many of the gtutorials available at the time of this writing range from unecessarily complicated to flat-out wrong. This guide is intended to address many of those shortfalls.

Prerequisites

To complete this guide, you should already have:

  • Basic knowledge of Linux
  • An Ethereum wallet
@AfzalivE
AfzalivE / asoundrc
Created Nov 14, 2017
Ps3 eye + 3.5mm speaker asoundrc
View asoundrc
# ps3 eye + 3.5mm speaker Raspberry Pi
## Suggested by http://julius.sourceforge.jp/forum/viewtopic.php?f=9&t=66
## Modified by https://github.com/afzalive
pcm.jack {
type hw
card ALSA
}
pcm.array {
type hw
card CameraB409241
@simoncos
simoncos / miniconda_on_rpi.md
Last active May 17, 2022
Install Miniconda 3 on Raspberry Pi
View miniconda_on_rpi.md
@asukakenji
asukakenji / 0-go-os-arch.md
Last active May 13, 2022
Go (Golang) GOOS and GOARCH
View 0-go-os-arch.md

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@wojteklu
wojteklu / clean_code.md
Last active May 17, 2022
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

View golang-create-read-write-delete-file.go
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@melvincabatuan
melvincabatuan / BOOSTwithPython3
Created Apr 5, 2015
Compile BOOST with Python3 support
View BOOSTwithPython3
1. Check Python3 root
>>> import sys
>>> import os
>>> sys.executable
'/usr/local/bin/python3'
OR
$ which python3
/usr/local/bin/python3