Skip to content

Instantly share code, notes, and snippets.

View zmwilliam's full-sized avatar
🦍
trying to exit vim

William Zmiyewski zmwilliam

🦍
trying to exit vim
View GitHub Profile
@zmwilliam
zmwilliam / create_user_database_postgresql.md
Last active August 21, 2018 21:45
Create PostgreSQL new database and new user with privileges
# user logon
$ su - postgres  

# open pg
$ psql  

# create user
$ CREATE USER newuser WITH PASSWORD 'myPassword';  
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"window.zoomLevel": 0,
"workbench.colorTheme": "Gruvbox Dark (Medium)",
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 3000,
"gitlens.keymap": "chorded",
"workbench.iconTheme": "vscode-great-icons",
@zmwilliam
zmwilliam / synccounter.go
Created January 22, 2019 15:54
goalng syncronized counter using mutex
package main
import (
"fmt"
"sync"
)
type counter struct {
mutex sync.Mutex
value int
@zmwilliam
zmwilliam / howto.md
Last active April 16, 2019 13:48
Add Insecure Registry to Docker - Linux Mint

$ sudo mkdir /etc/systemd/system/docker.service.d/

$ sudo vim /etc/systemd/system/docker.service.d/startup_options.conf

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 --insecure-registry registry.yourdomain.com --insecure-registry registry.yourdomain2.com
@zmwilliam
zmwilliam / nginx
Created September 24, 2019 16:53 — forked from vdel26/nginx
Openresty init.d script
#!/bin/sh
#
# chkconfig: 2345 55 25
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx
# For Debian, run: update-rc.d -f nginx defaults
# For CentOS, run: chkconfig --add nginx
#
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
//! moment.js
//! version : 2.10.2
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Ac.apply(null,arguments)}function b(a){Ac=a}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function d(a){return"[object Array]"===Object.prototype.toString.call(a)}function e(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function f(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function g(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function h(a,b){for(var c in b)g(b,c)&&(a[c]=b[c]);return g(b,"toString")&&(a.toString=b.toString),g(b,"valueOf")&&(a.valueOf=b.valueOf),a}function i(a,b,c,d){return ya(a,b,c,d,!0)
@zmwilliam
zmwilliam / install.sh
Created October 26, 2025 13:53
Install erlang with wx
brew install wx-widgets@3.2
export KERL_CONFIGURE_OPTIONS="--with-wx-config=$(which wx-config-3.2)"
asdf install erlang 28.1.1