Skip to content

Instantly share code, notes, and snippets.

@jameswei
jameswei / Makefile
Created February 23, 2022 15:09 — forked from turtlemonvh/Makefile
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
@jameswei
jameswei / Microsoft.PowerShell_profile.ps1
Created May 19, 2021 15:23
powershell profile with some helper functions and aliases
# install ohmyposh
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme star
# Increase history
$MaximumHistoryCount = 10000
# Produce UTF-8 by default
$PSDefaultParameterValues["Out-File:Encoding"]="utf8"
namespace Sagas
{
using System;
using System.Collections.Generic;
class Program
{
static ActivityHost[] processes;
  • What do Etcd, Consul, and Zookeeper do?
    • Service Registration:
      • Host, port number, and sometimes authentication credentials, protocols, versions numbers, and/or environment details.
    • Service Discovery:
      • Ability for client application to query the central registry to learn of service location.
    • Consistent and durable general-purpose K/V store across distributed system.
      • Some solutions support this better than others.
      • Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
  • Centralized locking can be based on this K/V store.
@jameswei
jameswei / iterm2-solarized.md
Created July 29, 2018 12:49 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@jameswei
jameswei / README.md
Created June 19, 2018 14:44 — forked from sangupta/README.md
A simple shell script to run a Java program from Linux shell in the background

This is a simple script to run a Java program from Linux shell in the background - so that the process does not terminates when you log out of the shell.

Usage is simple:

  • Start the process
$ ./java-app-run.sh start
@jameswei
jameswei / perfectelementary.bash
Created May 28, 2018 16:04 — forked from ezeeyahoo/perfectelementary.bash
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#https://elementary.io/
#Clean-up System
sudo apt-get purge midori-granite -y
sudo apt-get purge yelp -y
sudo apt-get purge evince -y
sudo apt-get purge gnome-orca -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
@jameswei
jameswei / eOS_setup.sh
Created May 28, 2018 06:31
Personal elementaryOS (Loki) setup routine after a new eOS installation
# Download Elementary OS from here:
# https://elementary.io
#
# To execute:
# sudo chmod +x -v eOS_setup.sh
# sudo ./eOS_setup.sh
# Update System
sudo apt-get update && sudo apt-get dist-upgrade
@jameswei
jameswei / README.md
Created May 16, 2018 11:36 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@jameswei
jameswei / custom-loki.sh
Created May 16, 2018 06:34 — forked from evertontrindade/custom-loki.sh
Things to do after install Elementary OS Loki (0.4)
# First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
# Clean-up System
sudo apt-get purge epiphany-browser epiphany-browser-data #browser
sudo apt-get purge midori-granite #browser
sudo apt-get purge noise
sudo apt-get purge scratch-text-editor #text-editor
sudo apt-get purge modemmanager
sudo apt-get purge geary #email