Skip to content

Instantly share code, notes, and snippets.

View jjwatt's full-sized avatar

Jesse Wattenbarger jjwatt

  • North Augusta, SC
View GitHub Profile
@jjwatt
jjwatt / rc.lua.fnl
Created February 6, 2024 20:44
my awesome config converted to fennel with antifennel (probably does not work)
(pcall require :luarocks.loader)
(local gears (require :gears))
(local awful (require :awful))
(require :awful.autofocus)
(local wibox (require :wibox))
@jjwatt
jjwatt / custom-markskip-pytest
Last active February 5, 2024 20:59
replace pytest marks with pytest skips
#!/bin/sh
find -type f -name '*.py' -print0 \
| xargs -0 gawk -i inplace '/# @pytest.mark.github/ {$0=$0"\n @pytest.mark.skip(reason=\"deprecate gh marks\")"} 1'
@jjwatt
jjwatt / rc.el
Created December 20, 2023 02:56
vanilla emacs scratch file of functions
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(eval-when-compile (unless (package-installed-p 'use-package)
@jjwatt
jjwatt / vanilla_evil.el
Created December 20, 2023 02:42
vanilla emacs "config"
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(unless (package-installed-p 'evil)
@jjwatt
jjwatt / locvar.sh
Created December 5, 2023 18:54
shell for local namespaced variables
#
# Copyright 2008 Stephane Chazelas <stephane_chazelas@yahoo.fr>
#
# Feel free to use that code.
#
PS4='$_l_fstack> '
# functions that are meant to have a local scope (that use "locvar") should be
# declared as:
# sub funcname; _funcname() { ...
# When called as "funcname", it gets its own name space for variables,
stayawake() {
while :; do
# If we've been idle for more than $num msecs
if [ "$(xprintidle)" -gt 100000 ]
then
# Randomly move the mouse somewhere on the screen
xdotool mousemove "$(( ${RANDOM} % ${screenwidth:-1920} ))" "$(( ${RANDOM} % ${screenheight:-1080} ))"
fi
sleep 30
done
@jjwatt
jjwatt / README.md
Last active September 20, 2022 14:12
Getting bazel to work with zscaler on macOS (with asdf, too)

Bazel over zscaler or VPN with SSL on macOS

zscaler and some VPNs mess up ssl certs and bazel will fail fetching. Similar deal if you have your own repo with self-signed certs, I reckon.

Errors Fetching with Bazel

So, as you run into errors, note the server bazel is trying to download from e.g., here it's mirror.bazel.build

ERROR: /private/var/tmp/_bazel_jwattenbarger/a2f146ad396f505902e2eb9d5d7b725a/external/bazel_tools/tools/test/BUILD:36:6: @bazel_tools//tools/test:coverage_report_generator depends on @remote_coverage_tools//:coverage_report_generator in repository @remote_coverage_tools which failed to fetch. no such package '@remote_coverage_tools//': java.io.IOException: Error downloading [https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip] to /private/var/tmp/_bazel_jwattenbarger/a2f146ad396f505902e2eb9d5d7b725a/external/remote_coverage_tools/temp8333830970334961723/coverage_output_generator-v2.5.zip: PKIX path building failed: sun.sec
@jjwatt
jjwatt / harshfirewallgitssh.sshconfig
Created January 14, 2021 13:12
If you're behind a harsh MITM firewall trying to use github or gitlab with ssh, it may be blocking port 22 or even inspecting your packets. Luckily, both github and gitlab offer alternative ssh services over port 443. Took a little digging to find that gitlab's is "altssh.gitlab.com," but having these lines in your ~/.ssh/config should make you …
Host gitlab.com
Hostname altssh.gitlab.com
Port 443
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Host github.com
Hostname ssh.github.com
Port 443
@jjwatt
jjwatt / lists_queues.cs
Created November 3, 2020 03:02
Messing with List<T> lists in C#
using System;
using System.Collections.Generic;
using NUnit.Framework;
namespace NUnitTestProject1
{
public class Tests
{
public List<String> Mystrs;
[SetUp]
@jjwatt
jjwatt / openstm32_shell.nix
Created March 3, 2020 03:23
Getting OpenSTM32 System Workbench to work on Nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "stupid-java-installer-bs-env";
targetPkgs = pkgs: (with pkgs;
[ bash
oraclejdk8
gtk2
gnome2.glib
xorg.libXext