Skip to content

Instantly share code, notes, and snippets.

View jorgenbs's full-sized avatar

Jørgen Bøe Svendsen jorgenbs

View GitHub Profile
@jorgenbs
jorgenbs / gist:67428f8cf587d99d9f81db9733b90c84
Created January 19, 2024 11:19
Oslo kommune - road maintenance alert
name: Crawlers
on:
workflow_dispatch:
schedule:
- cron: '*/30 * * * *'
jobs:
check-oslokommune:
runs-on: ubuntu-latest
# TODO: save this as `$HOME/.config/fish/conf.d/use_nvmrc.fish`
# HOW IT WORKS
# `nvm use` whenever .nvmrc is present in $PWD when using fish shell
# when traveling deeper, use the parent .nvmrc unless otherwise set
# also go back to default nvm when leaving the nvmrc-specified zone
function set_nvm --on-event fish_prompt
# runs whenever the fish_prompt event occurs
# if the current directory hasn't changed, do nothing

Keybase proof

I hereby claim:

  • I am jorgenbs on github.
  • I am jorgenbs (https://keybase.io/jorgenbs) on keybase.
  • I have a public key ASAzg3Jiyaf-bHpGonLc8qT85PuY3VjMx5xTCTPc1rS0kwo

To claim this, I am signing this object:

@jorgenbs
jorgenbs / commit-msg
Last active March 24, 2016 04:00
denies commit if staged file has lint warn/err
#!/bin/bash
files=$(git diff --cached --name-status | grep '^\(A\|M\).*\.jsx\?$' | sed 's/^[AM]//g')
eslintrc=$(git rev-parse --show-toplevel)/website/Sherpa/interfaceSource/.eslintrc.js
warn_threshold=5
# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
exit 0
fi
#!/bin/bash
files=$(git diff --cached --name-only | grep '\.jsx\?$')
# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
exit 0
fi
failed=0
for file in ${files}; do
!function (name, definition) {
if (typeof module != 'undefined') module.exports = definition;
else if (typeof define == 'function' && define.amd) define(name, definition);
else this[name] = definition;
}('MyModule', function () {
/*module*/
});