Skip to content

Instantly share code, notes, and snippets.

@wallyqs
wallyqs / readme.md
Created July 22, 2021 15:03
Mixed Auth via Leafnodes

Mixed Auth via Leafnodes

Server A starts with basic auth:

port = 4222

leaf {
  port = 7422
}
@jdah
jdah / .vimrc
Created June 14, 2021 11:54
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@wallyqs
wallyqs / aks-lb.md
Last active October 18, 2022 11:25
Setting up a NATS Server with external access on Azure

Setting up a NATS Server with external access on Azure

With the following, you can create a 3-node NATS Server cluster:

kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/b55687a97a5fd55485e1af302fbdbe43d2d3b968/nats-server/leafnodes/nats-cluster.yaml

The configuration map from the NATS cluster that was created can be found below.

@Gavinok
Gavinok / config.py
Last active July 3, 2024 20:00
This is a simplified version of my qutebrowser config
import subprocess
import os
from qutebrowser.api import interceptor
"""
qutebrowser settings for video
for more settings check out
https://qutebrowser.org/doc/help/settings.html
"""
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 4, 2024 23:03
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@corinneling
corinneling / sync-forked-repo.md
Last active February 5, 2023 15:23
How to sync up a forked repository

How to Sync A Forked Repo

One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).

  1. Make sure you are in the right place
    • That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.

      fatal: refusing to merge unrelated histories

    • That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error

  • An easy way to check where you are is the command:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 5, 2024 04:49
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages
@darkguy2008
darkguy2008 / UDPSocket.cs
Last active May 20, 2024 19:01
Simple C# UDP server/client in 56 lines
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
public class UDPSocket
{
private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
@devlead
devlead / parsegitlog.ps1
Created October 29, 2015 17:30
Example working with git log in PowerShell
# Get last 100 log entries as a PowerShell object
$gitHist = (git log --format="%ai`t%H`t%an`t%ae`t%s" -n 100) | ConvertFrom-Csv -Delimiter "`t" -Header ("Date","CommitId","Author","Email","Subject")
# Now you can do iterate over each commit in PowerShell, group sort etc.
# Example to get a commit top list
$gitHist|Group-Object -Property Author -NoElement|Sort-Object -Property Count -Descending
# Example do something for each commit
$gitHist|% {if ($_.Author -eq "Mattias Karlsson") {"Me"} else {"Someone else"} }