Skip to content

Instantly share code, notes, and snippets.

Bonno / activecollab-helper-time.js
Last active November 13, 2019 09:30
Calculate cumulative hours on the time overview page
View activecollab-helper-time.js
// ==UserScript==
// @name ActiveCollab: Cumulate daily hours
// @namespace Violentmonkey Scripts
// @match https://*/my-time
// @grant none
// @version 1.0
// @author Bonno Nachtegaal-Karels
// @description Calculate cumulative hours on the time overview page
// @homepageURL
Bonno / jira-helper.user.js
Last active June 28, 2021 09:47
Copy issue key and title for creating git branch
View jira-helper.user.js
// ==UserScript==
// @name Jira: helper
// @namespace
// @version 1.0.0
// @description features: 1. copy issue key and title for creating git branch
// @author Rain Chen / Bonno
// @license MIT
// @match https://**
// @match https://**
// @grant none
Bonno / gist:28a7b11f12c882bdd18ecb829c9080e6
Created February 21, 2019 07:55
Sort and count errors from magento or apache error log
View gist:28a7b11f12c882bdd18ecb829c9080e6
sed -e "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9:+-]* //g" system.log | grep ERR | sort -n | uniq -cd | sort -n
Bonno /
Created September 14, 2018 11:28
Send notification to all x users with notify-send
users=$(who | grep -iv pts | awk '{print $1}')
for user in $users
echo $user
pgrep "gnome-session" -u $user | while read -r line; do
#exp=$(cat /proc/$line/environ | grep -z "^DBUS_SESSION_BUS_ADDRESS=")
exp=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$line/environ | tr '\0' '\n')
echo export "$exp" > /tmp/
Bonno /
Last active May 22, 2019 17:55 — forked from luislobo/
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install packages to allow apt to use a repository over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
  1. After launching Rambox, open the Rambox Dev Tools.
  2. Run this script in the DevTools console

It will pull the team icon from each slack account you're connected to that has finished loading. If you log into another slack account later on in your session, you can run the script again to fill in any missing team icons.

Bonno /
Last active May 16, 2018 08:51 — forked from soarez/
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

Bonno /
Last active October 8, 2021 10:40
Opening multiple SSH sessions with iTerm automatically. To be used in an Automator flow.

Create a new Automater flow

Add 'Service'. Service receives 'no input' in 'iTerm'. Add 'Run AppleScript'.

Bonno / howto-control-spotify.txt
Last active March 23, 2017 09:43
Control spotify in OS X
View howto-control-spotify.txt
- Open Automator and create a new Service
- Change "service receives selected:" [text] to [no input]
- Add the "run apple script" action to the main screen
- Enter and save the following three apple scripts
- Go to keyboard shortcuts preference pane and configure your shortcuts to the newly created services
View Long-lasting FB access-token for server to pull FB page info
Having found that it is possible to generate a Facebook Page Access Token that does not expire (with help from @Igy), here is a clear, step-by-step quide for all those looking to the same:
1. Make sure you are the admin of the FB page you wish to pull info from
2. Create a FB App (should be with the same user account that is the page admin)
3. Head over to the Facebook Graph API Explorer
4. On the top right, select the FB App you created from the "Application" drop down list
5. Click "Get Access Token"
6. Make sure you add the manage_pages permission