Skip to content

Instantly share code, notes, and snippets.

View mbbx6spp's full-sized avatar
🎯
Focusing

Susan Potter mbbx6spp

🎯
Focusing
View GitHub Profile
@mbbx6spp
mbbx6spp / ExitCodeTestsExample.hs
Created November 6, 2011 20:30
Cabal file with test-suite block and explanation in a USAGE.md file.
module Main where
import Test.QuickCheck (quickCheck)
import Your.Module (encrypt, decrypt)
prop_reverseReverse :: [Char] -> Bool
prop_reverseReverse s = (reverse . reverse) s == s
prop_encryptDecrypt :: [Char] -> Bool
prop_encryptDecrypt s = (encrypt . decrypt) s == s
# make sure you put this in the root of the generate site build, not just in the root of your netlify repository!
/.well-known/webfinger* https://APPNAME.deno.dev/:splat 200
@mbbx6spp
mbbx6spp / VMWARE_VIX_API.md
Last active August 23, 2022 19:07
VMware VIX API documentation

VMWARE VIX API and SDK

Versions

Currently the installations I use of VMWare vCenter Server are version 5.1.x which is requires we use the following SDK version:

VIX Version Products Path
@mbbx6spp
mbbx6spp / 00README.org
Last active August 2, 2022 15:30
A gist of the commands, metadata file (.desktop), and script I wrote to delegate web URLs to the correct sandboxed web browser inside of the appropriate user profile in Linux. Should work in all distros.

Delegating web requests in Linux to correct browser profile

A few months ago I set this up and here is the write up on it since yesterday, while talking to a fellow Linux user, they found it intriguing.

My requirements

Any URL I click in Slack, Signal desktop app, or launch via terminal actions should launch into the correct sandboxed, user-profile web browser instance (in precedence order):

  • https://github.com/<workorg>.* should open in the work Firefox profile
@mbbx6spp
mbbx6spp / README.md
Created October 8, 2011 00:21
Git hooks to enforce pull request on master workflow

Sanity checking Git Hook for pre-commit

Checks that you are trying to push to master (or other key branches) from your local repository.

Installation

Download the above raw file (edit it as you please) and place inside your Git repository under: $GITDIR/hooks/pre-commit where $GITDIR is typically .git under your project working directory. Then make sure you make it executable: chmod +x .git/hooks/pre-commit

import cats.effect.{IO, IOApp, ExitCode}
import io.circe.generic.auto._
import org.http4s.Status._
import org.http4s.blaze.client.BlazeClientBuilder
import org.http4s.circe._
import org.http4s.client.Client
import org.http4s.syntax.all._
sealed trait IpResult
case class IpInfo(ip: String) extends IpResult

Rewriting Git history on feature branches

Assumes:

  • feature branch is feature/add_csv_file
  • mainline is deploy

If you want to rewrite Git history on your feature branch here is how to do it.

  1. Make sure you are on the branch you want to rewrite the history of:
@mbbx6spp
mbbx6spp / OTP.md
Created January 10, 2012 03:33
Erlang/OTP Glossary

Erlang/OTP Glossary

I am hoping this will serve as a reference for coworkers and others new to Erlang and OTP to be able to figure out the terminology easier than I had to. I learned the hard way, so you don't have to!:)

  • Erlang/OTP - The set of libraries and conventions that are used as part of the core Erlang distribution by Ericsson to build fault-tolerant, distributed systems more effectively.
  • OTP Release - A fully deployable distribution to run on an "Erlang node" (see below). An OTP Release may have one or more OTP Applications running inside of it at any time.
  • OTP Application - Usually a stateful long-running and active set of Erlang processes that collaborate together to achieve a well-defined set of responsibilities. It is a packaging of these collaborating modules and processes into a directory structure (see 'OTP Application Conventions' below) along with metadata about the OTP Application and default/fallback environment variable values (in case the OTP Release above doe
@mbbx6spp
mbbx6spp / README.md
Created January 3, 2012 05:34
Retaining Git history of subdirectory from parent repository

Subdirectory Git Repository

This is a mini howto on moving a subdirectory to its own repository retaining history

Howto

Assume PARENT is the original parent Git repository (locally) and CHILD is the new local repository that you wish to create from a subdirectory, retaining all of its history from the PARENT repository; PARENT_PATH and CHILD_PATH are the paths to PARENT and CHILD respectively; SUBDIR is the relative path within the repository under extraction:

  1. git clone --no-hardlinks PARENT_PATH CHILD_PATH
  2. pushd CHILD_PATH
{
name = "mbbx6spp-test";
epoch = 2021;
description = "A test of /proc fs inputs for a Hydra jobset";
inputs = {
uptime = builtins.readFile /proc/uptime;
nixpkgs.url = "github:NixOS/nixpkgs/release-21.05";
};
outputs = { self, nixpkgs, uptime }: {
checks."x86_64-linux".test = nixpkgs.hello.override { name = "hello-${uptime}"; };