Skip to content

Instantly share code, notes, and snippets.

View example
$ echo '{"a":{"b":"quoted \" } {{{"}}{"c":{"d":2}}{"e":{"f":3}}' | go run firstobject.go
{"a":{"b":"quoted \" } {{{"}}
llimllib / mssql_to_csv.bash
Last active May 21, 2022
This is a script to convert every table in a Microsoft SQL Server database backup (.bak file) to a .csv file
View mssql_to_csv.bash
#!/usr/bin/env bash
# import an MS SQL .bak backup file to an MS SQL database, then export all
# tables to csv. run this script as ` <filename>`. It expects to be
# run in the same directory as the backup file.
# this is only tested on my mac (OS X Catalina). I tried to stick to posix, but
# It will probably require some tweaking for you. I hope it gives a general
# sense of what you need to do at the very least.
# is a handy site for docs that isn't linked
# from the docs page, for whatever reason. Gives good xbps-* examples
# install non-free repository:
sudo xbps-install void-repo-nonfree
# update the system; all installs failed before this:
sudo xbps-install -Su
# xbps is hard to type. Add these aliases to your bashrc if xbps-install is
View gist:c0f82d23d6f44501733b21cdd2e9f8d7
default 20:39:37.686798-0400 Finder bundle 0x4ff8 is launch-disabled and needs to be set trusted
default 20:39:37.688071-0400 lsd *** Registration warnings for <private>:
default 20:39:37.688087-0400 lsd Missing iTunes metadata
error 20:39:37.693434-0400 lsd LSStringLocalizer development region English not found in localizations available for bundle <private>
default 20:39:37.694953-0400 lsd Non-fatal error enumerating at <private>, continuing: Error Domain=NSCocoaErrorDomain Code=260 "The file “PlugIns” couldn’t be opened because there is no such file." UserInfo={NSURL=PlugIns/ -- file:///Applications/, NSFilePath=/Applications/, NSUnderlyingError=0x1267223d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
default 20:39:37.695065-0400 lsd - 45683955: Checking whether application is managed at file:///Applications/
default 20:39:37.695185-0400 lsd (null):5:4:1:0:_LSServerRegisterItemInfo begin
default 20
#!/usr/bin/env bash
# many settings from
# many settings from
# instructions on finding the default you've changed:
# previous install notes at:
fancy_echo() {
llimllib / Makefile
Last active Mar 20, 2022
The simplest possible use of esbuild to import a package and run a function in the browser
View Makefile
./node_modules/.bin/esbuild index.js --bundle --outfile=out.js
View allowed_answers.txt
View bezier.js
var Bezier=function(t){function n(i){if(r[i])return r[i].exports;var e=r[i]={exports:{},id:i,loaded:!1};return t[i].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){"use strict";t.exports=r(1)},function(t,n,r){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(){function n(t,n,r,i,e){"undefined"==typeof e&&(e=.5);var o=h.projectionratio(e,t),s=1-o,u={x:o*n.x+s*i.x,y:o*n.y+s*i.y},a=h.abcratio(e,t),f={x:r.x+(r.x-u.x)/a,y:r.y+(r.y-u.y)/a};return{A:f,B:r,C:u}}var e=Math.abs,o=Math.min,s=Math.max,u=Math.acos,a=Math.sqrt,f=Math.PI,c={x:0,y:0,z:0},h=r(2),x=r(3),y=function(t){var n=t&&t.forEach?t:[],r=!1;if("object"===i(n[0])){r=n.length;var o=[];n.forEach(function(t){["x","y","z"].forEach(function(n){"undefined"!=typeof t[n]&&o.push(t[n])})}),n=o}var s=!1,u=n.length;if(r){if(r>4)
llimllib /
Created Dec 28, 2021
The simplest menu implementation I could come up with in rich
from rich.console import Console
from import Style
from rich.table import Table
from getchar import getchar
SELECTED = Style(bgcolor="white")
def print_table(console, table, rows=[], selected=0):
for i, row in enumerate(rows):