Skip to content

Instantly share code, notes, and snippets.

View kentwait's full-sized avatar

Kent Kawashima kentwait

  • Japan
  • 02:52 (UTC +09:00)
  • X @kent
View GitHub Profile
@onlyphantom
onlyphantom / docker-volumes.md
Last active September 11, 2024 20:59
Demystifying Docker Volumes for Mac and PC Users

Demystifying Docker Volumes for Mac and PC Users

  1. Docker runs on a Linux kernel

Docker can be confusing to PC and Windows users because many tutorials on that topic assume you're using a Linux machine.

As a Linux user, you learn that Volumes are stored in a part of the host filesystem managed by Docker, and that is /var/lib/docker/volumes. When you're running Docker on a Windows or Mac OS machine, you will read the same documentation and instructions but feel frustrated as that path don't exist on your system. This simple note is my answer to that.

When you use Docker on a Windows PC, you're typically doing one of these two things:

  • Run Linux containers in a full Linux VM (what Docker typically does today)
@basoro
basoro / proxmox-proxy
Created May 25, 2019 20:45
Running Proxmox behind a single IP address
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 October 25, 2024 06:12
Modern JavaScript in React Documentation

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
@vineyardbovines
vineyardbovines / macOS x arch linux
Last active July 17, 2024 16:57
dual booting arch linux on a macbook pro 12,1 (retina, 13", 2015)
#####################################################
# 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 April 4, 2022 23:45
Headless NVIDIA overclock setup under Ubuntu Server 16.04 for ethereum mining

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 November 14, 2017 01:16
Ps3 eye + 3.5mm speaker 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 October 7, 2024 11:50
Install Miniconda 3 on Raspberry Pi
@asukakenji
asukakenji / 0-go-os-arch.md
Last active November 6, 2024 03:19
Go (Golang) GOOS and GOARCH

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 November 15, 2024 07:19
Summary of 'Clean code' by Robert C. Martin

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

package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"