Skip to content

Instantly share code, notes, and snippets.

View billwanjohi's full-sized avatar

Bill Kaguru Wanjohi billwanjohi

View GitHub Profile
#!/bin/bash
set -euxo pipefail
BW_FOLDER=$(bw list folders | jq -rc ".[] | select(.name == \"$MY_FOLDER_NAME\") | .id")
BW_ITEMS=$(bw list items --folderid $BW_FOLDER | jq -rc '.[] | select(.organizationId == null) | .id')
BW_ORGANIZATION=$(bw list organizations --search $MY_ORG_NAME | jq -rc '.[].id')
BW_COLLECTIONS=$(bw list collections --search $MY_COLLECTION_NAME --organizationid=$BW_ORGANIZATION | jq -c '.[].id' | jq -s | bw encode)
echo $BW_ITEMS | xargs --replace={} bw move {} $BW_ORGANIZATION $BW_COLLECTIONS
# Requires i3lock-color: https://github.com/Raymo111/i3lock-color
# # catppuccin-latte
# COLOR_BASE="eff1f5ff"
# COLOR_BLUE="1e66f5ff"
# COLOR_FLAMINGO="dd7878ff"
# COLOR_GREEN="40a02bff"
# COLOR_RED="d20f39ff"
# COLOR_SKY="04a5e5ff"
# COLOR_TEAL="179299ff"
package main
import (
"astuart.co/goq"
"fmt"
"github.com/gocolly/colly"
"io/ioutil"
"log"
"regexp"
"strconv"
@billwanjohi
billwanjohi / find_deprecated_lambda_functions
Last active August 28, 2018 17:25
find deprecated AWS Lambda functions
#!/usr/bin/env python
# prints all nodejs 0.1 functions, which will cease to function soon
import logging
import boto3
import botocore
def main():
@billwanjohi
billwanjohi / gist:7210089
Created October 29, 2013 06:50
scrape sportstracker data
require 'watir-webdriver'
require 'csv'
require 'pry'
# TODO:
# scrape specific activities (e.g. running, cycling)
# plot scatter
# fit curve
begin
b = Watir::Browser.new :phantomjs
@billwanjohi
billwanjohi / gist:3767425
Created September 22, 2012 19:03
my public gist
this is what public looks like