Skip to content

Instantly share code, notes, and snippets.

@gcv
gcv / mikrotik-hap-ac-conf-FAST.txt
Last active April 29, 2022 13:28
MikroTik hAP ac configuration
# jun/09/2020 14:35:33 by RouterOS 6.46.6
# software id = XN0M-1C1M
#
# model = RouterBOARD 962UiGS-5HacT2HnT
# serial number = REDACTED
/interface bridge
add admin-mac=REDACTED auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX disabled=no distance=indoors frequency=auto installation=indoor mode=ap-bridge \
ssid="NH Test (2.4GHz)" wireless-protocol=802.11
@gcv
gcv / blockstack.txt
Created November 10, 2017 22:09
Blockstack verificationb
Verifying my Blockstack ID is secured with the address 1MLxvDMpbjNugWLErByfFzYxJLyidUaSsA https://explorer.blockstack.org/address/1MLxvDMpbjNugWLErByfFzYxJLyidUaSsA
@gcv
gcv / pve.sh
Created October 27, 2015 04:56
Python isolated virtualenv scripts
function pve() {
local pd=~/.python
local env_name=$1
if [[ -z ${env_name} ]]; then
if [[ -z ${VIRTUAL_ENV} ]]; then
echo "usage: pve{2,3} <envname>"
return 1
else
deactivate
return 0
@gcv
gcv / rust_nightly.rb
Created January 26, 2015 18:10
Homebrew formula for installing the official Rust nightly binary build. Useful because: (1) the `rust.rb` formula in Homebrew does not currently install Crate, and (2) the official binary `.pkg` pollutes `/usr/local`. This formula respects Homebrew's installation directory.
class RustNightly < Formula
url "https://static.rust-lang.org/dist/rust-nightly-x86_64-apple-darwin.pkg", using: :nounzip
homepage "http://www.rust-lang.org"
sha1 ""
version Date.today.to_s
def install
system "pkgutil --expand rust-nightly-x86_64-apple-darwin.pkg rn"
package main
import "fmt"
func main() {
for i := 1; i <= 100; i++ {
if i % 3 == 0 {
fmt.Print("Fizz")
}
if i % 5 == 0 {
@gcv
gcv / gpgd.zsh
Last active October 6, 2016 14:32
# Currently only tested on zsh.
# To install, just copy this function to your .zshrc file.
# On Mac OS, make sure you have greadlink available (install coreutils
# through Homebrew).
# Make sure you have the GnuPG binary in your path.
function gpgd() {
# Enables mounting GPG-encrypted tar files as directories. Upon
# dismount, updates the encrypted tar file.