Skip to content

Instantly share code, notes, and snippets.

View rensjaspers's full-sized avatar

Rens Jaspers rensjaspers

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rensjaspers on github.
  • I am jaspers (https://keybase.io/jaspers) on keybase.
  • I have a public key whose fingerprint is E52E BB76 6294 F8EB 1583 A347 9A7C 6896 40FD ED06

To claim this, I am signing this object:

@rensjaspers
rensjaspers / install-managed-chrome-ubuntu.sh
Last active February 11, 2018 14:33
install managed chrome on ubuntu
#apt-get install libxss1 libappindicator1 libindicator7
#wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
#dpkg -i google-chrome*.deb
#sudo apt-get install -f
mkdir /etc/opt/chrome
mkdir /etc/opt/chrome/policies
mkdir /etc/opt/chrome/policies/managed
mkdir /etc/opt/chrome/policies/recommended
chmod -w /etc/opt/chrome/policies/managed
wget https://gist.githubusercontent.com/rensjaspers/83248e61f23e7f606937fc76a25476af/raw/0f89c7e15b6ffc69a6f0d134fff6ce6cd0a277d8/policy.json
@rensjaspers
rensjaspers / mirror.sh
Created April 24, 2017 07:33
Create website mirror with wget
wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH https://yourwebsite
@rensjaspers
rensjaspers / Accept all changes in Google Docs
Created April 25, 2017 14:38
Add this line of code to your bookmarks and use it to accept all changes in Google Docs
javascript:(function(){ var d=document.getElementsByClassName("docos-accept-suggestion"); d = Array.prototype.slice.call(d); d.forEach(function(n){ var e = document.createEvent("MouseEvents"); e.initEvent("click", true, false); n.dispatchEvent(e,true); e = document.createEvent("MouseEvents"); e.initEvent("mousedown", true, false); n.dispatchEvent(e,true); e = document.createEvent("MouseEvents"); e.initEvent("mouseup", true, false); n.dispatchEvent(e,true); }); })();
@rensjaspers
rensjaspers / insert-date.gs
Created June 14, 2017 11:34
Insert dd-mm-yyyy date in Google Doc
function onInstall(e) {
onOpen(e);
}
function onOpen() {
DocumentApp.getUi().createMenu('Utilities')
.addItem('Insert today\'s date', 'insertDate')
.addToUi();
}
@rensjaspers
rensjaspers / remove-other-search-engines.js
Created June 24, 2017 10:23
Remove other search engines from Google Chrome
/*
1. ) Go to chrome://settings/searchEngines
2. ) Press Ctrl+Shift+J (or ⌥+⌘+J (Option+Command+J) if you're using Mac OS X)
3. ) Paste this script and press ENTER.
You may have to repeat step 3 two or three times.
*/
var otherSearchEngineList = document.getElementById('other-search-engine-list');
var d = otherSearchEngineList.getElementsByClassName("row-delete-button");
d = Array.prototype.slice.call(d);
@rensjaspers
rensjaspers / install-select-recordgif.sh
Last active July 14, 2017 08:13
Install create gif of selection on screen (Ubuntu)
# get dependencies for this script
sudo apt install byzanz git dh-autoreconf libx11-dev
# get xrectsel to make selection on screen
git clone https://github.com/lolilolicon/xrectsel
cd xrectsel
./bootstrap # required if ./configure is not present
./configure --prefix /usr
make
sudo make DESTDIR="$directory" install
@rensjaspers
rensjaspers / install-skippy-xd.sh
Created July 14, 2017 08:11
Install Skippy-XD (full-screen Exposé-style standalone task switcher for X11) on Lubuntu 17
#!/bin/bash
sudo apt install libimlib2-dev libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxft-dev libxrender-dev zlib1g-dev libxinerama-dev libxcomposite-dev libxdamage-dev libxfixes-dev libxmu-dev git
cd /tmp
git clone https://github.com/richardgv/skippy-xd.git
cd skippy-xd
make
sudo make install
@rensjaspers
rensjaspers / mydotfiles-setup.sh
Last active November 18, 2019 16:44
Quickly install dotfiles
#!/bin/bash
git clone --bare git@github.com:rensjaspers/dotfiles.git $HOME/.mydotfiles
function mydotfiles {
/usr/bin/git --git-dir=$HOME/.mydotfiles/ --work-tree=$HOME $@
}
mydotfiles checkout
mydotfiles config status.showUntrackedFiles no
mydotfiles submodule init
mydotfiles submodule update --remote --recursive
find . -name "*.jpg" | xargs mogrify -strip -interlace Plane -sampling-factor 4:2:0 -resize '2073600@>' -quality 85%