Skip to content

Instantly share code, notes, and snippets.

$ asdf list-all kconf
[{url:https://api.github.com/repos/particledecay/kconf/releases/38429682assets_url:https://api.github.com/repos/particledecay/kconf/releases/38429682/assetsupload_url:https://uploads.github.com/repos/particledecay/kconf/releases/38429682/assets{?namelabel}html_url:https://github.com/particledecay/kconf/releases/tag/1.10.1id:38429682author:{login:particledecayid:685255node_id:MDQ6VXNlcjY4NTI1NQ==aatar_url:https://aatars.githubusercontent.com/u/685255?=4graatar_id:url:https://api.github.com/users/particledecayhtml_url:https://github.com/particledecayfollowers_url:https://api.github.com/users/particledecay/followersfollowing_url:https://api.github.com/users/particledecay/following{/other_user}gists_url:https://api.github.com/users/particledecay/gists{/gist_id}starred_url:https://api.github.com/users/particledecay/starred{/owner}{/repo}subscriptions_url:https://api.github.com/users/particledecay/subscriptionsorganizations_url:https://api.github.com/users/particledecay/orgsrepos_url:https://a
{
"message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column '2' in 'field list' (SQL: select `2` from `lists` where `lists`.`deleted_at` is null order by `name` asc limit 1)",
"exception": "Illuminate\\Database\\QueryException",
"file": "/app/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 671,
"trace": [
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 631,
"function": "runQueryCallback",
@bradym
bradym / stacktrace.json
Created August 9, 2020 04:51
linkace error message json stacktrace
{
"message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column '3' in 'field list' (SQL: select `3` from `tags` where `tags`.`deleted_at` is null order by `name` asc limit 1)",
"exception": "Illuminate\\Database\\QueryException",
"file": "/app/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 671,
"trace": [
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 631,
"function": "runQueryCallback",
@bradym
bradym / README.md
Created July 18, 2019 02:00
INSECURE Working config for rundeck + oauth2_proxy

Using these settings, I was able to get logged in to rundeck using oauth2 with google as the provider. More specifically, it's using gsuite and only works for users belonging to a specified group (ops@example.com).

You'll need to follow the setup steps here to get your gsuite setup ready for use: https://pusher.github.io/oauth2_proxy/auth-configuration#google-auth-provider

Known Issues

  • This setup is insecure as there is no SSL setup. I've only used it locally for testing.
  • oauth2_proxy does not support returning the groups a user is a memer of, so they cannot be passed to rundeck. This is why the group name is currently hardcoded. Not a good solution for most situations.
// Find duplicate ids
var allElements = document.getElementsByTagName("*"), allIds = {}, dupIDs = [];
for (var i = 0, n = allElements.length; i < n; ++i) {
var el = allElements[i];
if (el.id) {
if (allIds[el.id] !== undefined) {
dupIDs.push(el.id);
}
allIds[el.id] = el.name || el.id;
}
@bradym
bradym / install.sh
Last active September 23, 2018 17:21
Macbook air ubuntu 18.04
apt update
# Install driver for wireless card
apt install bcmwl-kernel-source
# Make function keys work correctly
echo 2 > /sys/module/hid_apple/parameters/fnmode
# Map caps lock to escape
setxkbmap -option caps:escape
@bradym
bradym / staticgen-archive.json
Created June 23, 2018 18:25
STATICGEN.COM DATA ARCHIVE
{"timestamp":1529778230155,"data":{"ace":[{"timestamp":1529778230155,"stars":36,"forks":6,"issues":0}],"acrylamid":[{"timestamp":1529778230155,"stars":295,"forks":41,"issues":44}],"adm-dev-kit":[{"timestamp":1529778230155,"stars":30,"forks":5,"issues":11}],"amsf":[{"timestamp":1529778230155,"stars":156,"forks":80,"issues":6}],"anodize":[{"timestamp":1529778230155,"stars":2,"forks":0,"issues":0}],"antwar":[{"timestamp":1529778230155,"stars":391,"forks":27,"issues":7}],"asimov-static":[{"timestamp":1529778230155,"stars":4,"forks":4,"issues":0}],"assemble":[{"timestamp":1529778230155,"stars":3563,"forks":247,"issues":25}],"awestruct":[{"timestamp":1529778230155,"stars":257,"forks":73,"issues":57}],"bake":[{"timestamp":1529778230155,"stars":18,"forks":3,"issues":0}],"baker":[{"timestamp":1529778230155,"stars":38,"forks":7,"issues":1}],"bang":[{"timestamp":1529778230155,"stars":8,"forks":1,"issues":0}],"bashblog":[{"timestamp":1529778230155,"stars":671,"forks":112,"issues":20}],"blackhole":[{"timestamp":1529778230
@bradym
bradym / README.md
Last active February 13, 2018 23:02
JSON encode question

Most modern languages include a library for dealing with json, including converting a native object to a json string.

In the language of your choice, write a function to convert a native object to a json string.

A python example is provided below.

// Remove links I never use
var remove = [
'nav-home-link',
'nav-resourceGroupsMenu'
];
for (var i = 0; i < remove.length; i++) {
var elem = document.querySelector('#' + remove[i]);
elem.parentNode.removeChild(elem);
}