Skip to content

Instantly share code, notes, and snippets.

@Bonno
Bonno / activecollab-helper-time.js
Last active February 12, 2024 09:53
Calculate cumulative hours on the time overview page
// ==UserScript==
// @name ActiveCollab: Cumulate daily hours
// @namespace Violentmonkey Scripts
// @match https://*/my-time
// @grant none
// @version 1.0
// @author Bonno Nachtegaal
// @description Calculate cumulative hours on the time overview page
// @homepageURL https://gist.github.com/Bonno/f706d9708cd1a594050b27e77757fa04
//
@Bonno
Bonno / ca.md
Last active February 11, 2024 12:08 — forked from soarez/ca.md
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
Bonno / mp4-to-wav
Created February 10, 2015 09:24
Convert mp4 to WAV with ffmpeg
ffmpeg -i <infile> -ac 2 -f wav <outfile>
@Bonno
Bonno / README.md
Last active August 11, 2023 14:13
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
Bonno / create-ssl-cert
Created July 6, 2015 08:33
generate x509 SHA256 hash self-signed certificate using OpenSSL
openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout example.com.crt -out example.com.crt
# Check cerificate
openssl x509 -noout -text -in example.com.crt
http://stackoverflow.com/questions/12168452/long-lasting-fb-access-token-for-server-to-pull-fb-page-info/21927690#21927690
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
@Bonno
Bonno / 1_vlc-server
Last active November 26, 2021 05:01
Use VLC as streaming proxy
vlc -vvv http://livestreams.omroep.nl/npo/3fm_vsr-bb --sout "#standard{access=http,mux=asf,dst=192.168.3.31:8080}"
@Bonno
Bonno / jira-helper.user.js
Last active June 28, 2021 09:47
Copy issue key and title for creating git branch
// ==UserScript==
// @name Jira: helper
// @namespace https://gist.github.com/Bonno/7519fe74b51615b1db302b51dc05549a/raw/52f500ceb603800a98c0abb15bda45372ed9361e/jira-helper.user.js
// @version 1.0.0
// @description features: 1. copy issue key and title for creating git branch
// @author Rain Chen / Bonno
// @license MIT
// @match https://*.atlassian.net/secure/*
// @match https://*.atlassian.net/browse/*
// @grant none
@Bonno
Bonno / install_latest_docker_compose.sh
Last active May 22, 2019 17:55 — forked from luislobo/install_latest_docker_compose.sh
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
##
## https://docs.docker.com/install/linux/docker-ce/ubuntu
##
# Install packages to allow apt to use a repository over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
@Bonno
Bonno / gist:28a7b11f12c882bdd18ecb829c9080e6
Created February 21, 2019 07:55
Sort and count errors from magento or apache error log
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