Skip to content

Instantly share code, notes, and snippets.

@xsharp
xsharp / go-os-arch.md
Created January 10, 2020 02:39 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

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

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@xsharp
xsharp / WSL-ssh-server.md
Created September 13, 2018 01:57 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
  3. Change UsePrivilegeSeparation to no
@xsharp
xsharp / asuswrt-merlin.md
Created June 23, 2018 12:00 — forked from 1951FDG/asuswrt-merlin.md
Instructions for installing and configuring Squid caching proxy server on Asuswrt-Merlin

Setup Entware-ng-3x on Asuswrt-merlin

Entware-ng-3x is a modern alternative to Optware.

For those unfamiliar with Optware: it's a software repository that offers various software programs that can be installed on your router. They allow you to add new functionality to your router (provided you have the know-how to properly configure them).

Entware-ng-3x system library is specially modified (patched) so that standard linux files that are normally located in /etc directory are now located in /opt/etc/ directory. To simplify things let's consider /etc/passwd file. On Asuswrt-merlin it normally looks something like:

admin:x:0:0:admin:/root:/bin/sh

nas:x:100:100:nas:/dev/null:/dev/null

@xsharp
xsharp / android_instructions.md
Last active September 4, 2017 08:07 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@xsharp
xsharp / gist:aa1e95840944706628fb
Created June 9, 2015 02:30
Install shadowsocks-libev as debian service from github source
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
sudo apt-get install build-essential autoconf libtool libssl-dev
./configure && make
make install
mkdir /etc/shadowsocks-libev
cp ./debian/shadowsocks-libev.init /etc/init.d/shadowsocks-libev
cp ./debian/shadowsocks-libev.default /etc/defaut/shadowsocks-libev
cp ./debian/config.json /etc/shadowsocks-libev
systemctl enable shadowsocks-libev

GitLab is a self hosted Git management software based on Ruby on Rails.

It is free software and that is always a plus!

This tutorial is heavily based on the excellent post at rosehosting.com and collects information I found in documentation and on the internet generally.

Note: We'll work in a root console using Bash

If you don't have an editor of choice install vim (it's great!)