Skip to content

Instantly share code, notes, and snippets.

pbhj

  • UK
Block or report user

Report or block pbhj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pbhj
pbhj / digikam.compilation.bash
Created Aug 4, 2019
installing digikam 6.1.0 on Kubuntu 18.04.2 (Bionic)
View digikam.compilation.bash
wget http://www.mirrorservice.org/sites/download.kde.org/stable/digikam/6.2.0/digikam-6.2.0.tar.xz
tar xvf ./digikam-6.2.0.tar.xz
cd digikam-6.2.0
# following README.md
export VERBOSE=1
export QTDIR=/usr/lib/qt5
export PATH=$QTDIR/bin:$PATH
# packages for compile and deb management
# without ECM one gets error `Could not find a package configuration file provided by "ECM"`
sudo apt install devscripts checkinstall extra-cmake-modules
@pbhj
pbhj / .mozilla_firefox_$profile_userContent.css
Last active May 17, 2019
modify date format on stackoverflow and stackexchange sites using userContent.css for Firefox
View .mozilla_firefox_$profile_userContent.css
/*
* Please share improvements here or on StackOverflow and add a link here.
* Please upvote https://meta.stackoverflow.com/questions/288674/custom-date-format/385090#385090 if you agree that
* users should have a choice of date format available.
*
* - see https://developer.mozilla.org/en-US/docs/Web/CSS/@document
* - https://www.regextester.com/ may be useful too, but careful of the double escaping!
* keywords: date format, date display, stackoverflow, stackexchange, css, script
*/
View scriptlet-display-anchors.js
javascript:var css = 'a:after{content:" (" attr(href) ") ";}', style = document.createElement('style'); style.type = 'text/css'; style.appendChild(document.createTextNode(css)); document.head.appendChild(style);
@pbhj
pbhj / postrm_script_for_edubu-art.sh
Created Aug 14, 2018
postrm script for edubu-art
View postrm_script_for_edubu-art.sh
#!/bin/sh
set -e
case "$1" in
remove)
# Restore Breathe icons diversions (we need a better way to do this)
dpkg-divert --quiet --rename --package edubuntu-artwork --remove /usr/share/icons/Breathe/16x16/places/start-here.png
dpkg-divert --quiet --rename --package edubuntu-artwork --remove /usr/share/icons/Breathe/22x22/places/start-here.png
dpkg-divert --quiet --rename --package edubuntu-artwork --remove /usr/share/icons/Breathe/24x24/places/start-here.png
dpkg-divert --quiet --rename --package edubuntu-artwork --remove /usr/share/icons/Breathe/32x32/places/start-here.png
View steam system info (Kaveri)
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G
CPU Family: 0x15
View ecn engine check codes 20171118
Zafira B
111306
160638
161450
161600
000000 + 8 flashes, then 3 flashes of engine check light
030300
032500
111306
@pbhj
pbhj / filter.sh
Created Jun 27, 2017
bookmarkive filter script
View filter.sh
#!/bin/sh
# take input from stdin and sort, remove duplicates and filter
set -e
cat /dev/stdin | sort | uniq | \
# strip hash endings (will kill twitter)
sed -e "s/#.*//" | \
# remove session id strings
@pbhj
pbhj / bookmarked-page-archiver.sh
Created Jun 27, 2017
bookmarkive shell script
View bookmarked-page-archiver.sh
#!/bin/bash
# this is a heavily modified version of "http://www.gwern.net/Archiving URLs"
# it should take the last ~1.1 months worth of bookmarks and make a local archive,
# using wget, of the pages that were bookmarked (or whose bookmark was altered).
# break on errors, see "help set" for info
set -e
# # copy places.sqlite locally
# cp --force $(find ~/.mozilla/ -name "places.sqlite") ./
@pbhj
pbhj / Groot-compromised-hosts
Last active Oct 16, 2016
A hosts file based on "Compromised stores that contain Javascript malware (scanned at 14th October 2016). See http://gwillem.gitlab.io/2016/10/14/github-censored-research-data/".
View Groot-compromised-hosts
# see https://gitlab.com/gwillem/public-snippets/snippets/28813
# list of hosts in "null routed /etc/hosts" file format
# these hosts were considered to be running compromised software as of October 2016
0.0.0.0 00-lawyer.com
0.0.0.0 1001-amulette.de
0.0.0.0 1001tablecloths.co.uk
0.0.0.0 1001tafelkleden.com
0.0.0.0 1010buybuy.com
0.0.0.0 1136500562.rsc.cdn77.org
@pbhj
pbhj / etc-init.d-plexmediaserver
Created Jan 19, 2015
/etc/init.d/plexmediaserver
View etc-init.d-plexmediaserver
k1210:~$ cat /etc/init.d/plexmediaserver
#!/bin/sh -e
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.
set -e
UPSTART_JOB_CONF="/etc/default/upstart-job"
INITSCRIPT="$(basename "$0")"
You can’t perform that action at this time.