Skip to content

Instantly share code, notes, and snippets.

View DBezemer's full-sized avatar

David Bezemer DBezemer

  • Bodø, Norway
View GitHub Profile
// ==UserScript==
// @name Amazon-Prime-Video-Give-Me-HTML5-Controls
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Remove annoying forced overlay and give back HTML5 Video Controls
// @author David Bezemer
// @include /^https://www\.(amazon|primevideo)\.com/.*$/
// @grant none
// ==/UserScript==
@DBezemer
DBezemer / parallel sphinx reindex
Created May 17, 2019 12:09
parallel sphinx reindex
peers=(entryPeer categoryPeer kuserPeer CuePointPeer TagPeer MetadataPeer categoryKuserPeer);
for peerName in "${peers[@]}"; do nohup /usr/bin/php /opt/kaltura/app/alpha/scripts/utils/updatePartnerEntries2Sphinx.php -1 execute ${peerName} >> /opt/kaltura/log/kaltura_reindex.log 2>&1 & done
unset peers
- hosts: index
gather_facts: no
tasks:
- name: Stop Monit
service: name=kaltura-monit state=stopped
- name: Stop Sphinx
service: name=kaltura-sphinx state=stopped
- name: Remove Existing Sphinx Data
shell: "/bin/sh -c 'rm -f /opt/kaltura/sphinx/kaltura_*'"
- name: Remove Existing Sphinx Binlog Data
@DBezemer
DBezemer / fix_centos_network.sh
Created September 18, 2017 11:10
Fix CentOS 6 network after VM clone
#!/bin/bash
# Annoying bug in vmware guest centos6
# eth0 doesn't exist
ifconfig eth0 2>/dev/null >/dev/null
if [ $? -ne 0 ] ; then
# Rename eth1 with eth0
echo "UDEV Config..."
rm /etc/udev/rules.d/70-persistent-net.rules
# Change ifcfg-eth0 with hostname address (in /etc/hosts)
echo "Changing eth0 address..."
### Keybase proof
I hereby claim:
* I am DBezemer on github.
* I am themmai (https://keybase.io/themmai) on keybase.
* I have a public key whose fingerprint is 1F19 0E24 666E FDDE E37F 82B6 60AC 6004 47F1 A90D
To claim this, I am signing this object:
@DBezemer
DBezemer / boilerplate.sh
Created June 7, 2016 08:31
Bash boilerplate with locking
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]>
## License: GNU General Public License v2, v3
#
# Lockable script boilerplate
### HEADER ###
LOCKFILE="/var/lock/`basename $0`"
check process kaltura-log-mon
with pidfile "/var/run/kaltura-log-mon.pid"
start program = "/sbin/service kaltura-log-mon start" with timeout 60 seconds
stop program = "/sbin/service kaltura-log-mon stop"
depends on ecdn.ini
check file ecdn.ini
with path "/opt/kaltura/app/configurations/ecdn.ini"
@DBezemer
DBezemer / nginx.template.rc.j2
Created May 24, 2016 11:00
Monit nginx config
check process nginx
with pidfile "/var/run/nginx.pid"
start program = "/sbin/service kaltura-nginx start" with timeout 60 seconds
stop program = "/sbin/service kaltura-nginx stop"
if failed host localhost port {{ streamingport }} protocol http then restart
group kaltura
depends on nginxbin, nginx.conf
@DBezemer
DBezemer / designer.html
Last active September 1, 2015 07:37
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">