Skip to content

Instantly share code, notes, and snippets.

View brujoand's full-sized avatar

Anders Brujordet brujoand

  • Norway
View GitHub Profile
@brujoand
brujoand / recentBuilds.sh
Last active May 14, 2020 07:39
Crawl jenkins project structure through the api to find all builds started after timestamp
#!/usr/bin/env bash
# To find all builds started within three hours of current time
# ./recentBuilds.sh "$(( $(date +%s) - ( 60 * 60 * 3) ))"
cutoff=$1
if [[ -z $cutoff ]]; then
echo "Please provide a unix timestamp as a cutoff time"
exit 1
@brujoand
brujoand / secret.sh
Created October 16, 2019 08:15
When you need to set a shell variable but don't want the contents displayed anywhere.
#!/usr/bin/env bash
set_secret() {
local variable_name=$1
if [[ -z "$variable_name" ]]; then
read -r -p "Variable name: " variable_name
fi
read -s -r -p "Password: " variable_value
declare -g "$variable_name"="$variable_value"
04b203eac279eb78d4d137d4b414c4b0ac6b3c694f302ffadff25be877a9f9abfcd519b02561bdd1ebd1465e21b915716b04536a6005817be16ecb9c8c64ff0cc3

Keybase proof

I hereby claim:

  • I am brujoand on github.
  • I am brujoand (https://keybase.io/brujoand) on keybase.
  • I have a public key ASCsHWVP5on7685GIXTvGuxWp9X0RN2hu-t0vjSyRP_Newo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am brujoand on github.
  • I am brujoand (https://keybase.io/brujoand) on keybase.
  • I have a public key whose fingerprint is 4505 4652 C397 261F 2D68 1274 1170 06EF 2566 9559

To claim this, I am signing this object:

@brujoand
brujoand / GeneriskDIYfullkropp.txt
Created November 15, 2013 08:01
Generisk DIY fullkropp
# Generisk DIY fullkropp
## Dag 1
* (Kettlebellswing x 30 + 20 strake markløft) x 3
* (Stående roing x 20 + 40 tåhev) x 3
* (Hoftehev x 20 + liggende innkast x 20) x 3
* (Skulderdrag x 20 + franskpress x 20) x 3
## Dag 2
* (Enarms Kettlebellswing x 15 + Goblet squat x 20 ) x 3
@brujoand
brujoand / torrefic.sh
Created January 20, 2013 15:28
torrent unpacker
#! /bin/sh
DL_DIR="/c/media/Torrents/Movies"
TRASH_DIR="/c/media/Torrents/Processed"
COMP_DIR="/c/media/sab/complete/cinematic"
findrar() {
path="$1"
file=$(find "$path" -name "*001.rar" -print0 | head -1)
if [ -z "$file" ]; then
@brujoand
brujoand / gitupdater
Created January 18, 2013 13:50
git repo updater
function gitupdate(){
repo=~/src
old_wd=`pwd`
gitroots=`for path in $repo/*/.git; do echo $path; done | sed 's/\/\.git//g'`
for gitroot in $gitroots; do
echo -e "\033[1;30m\nUpdating $gitroot:\033[0m"
cd $gitroot
branch=`git branch | sed -n 's/^\* //p'`
SELECT
distinct vo.obj_seq,
vo.obj_org_seq,
vo.obj_navn,
vo.obj_fornavn,
vo.obj_etternavn,
vo.obj_fornavn||' '||vo.obj_etternavn navn,
nb.etatsnavn,
vo.nlp_bruker,
vo.obj_type_id,
#!/usr/bin/env ruby
## coding:utf-8
def process_message(message)
puts ' Sending message: ' + message
end
def generate_ical()
uid = 'UID'
dtstart = '20100130T042210Z'