Skip to content

Instantly share code, notes, and snippets.

View un1versal's full-sized avatar

un1versal

  • error! out of memory
  • Scattered over the Atlantic
View GitHub Profile
@un1versal
un1versal / Installxbmc.sh
Last active February 9, 2017 18:10
Short and sweet install script.
#!/bin/bash
mkdir /home/setup
cd /home/setup
apt-get install pastebinit python-software-properties pkg-config -y
usermod --group sudo,cdrom,audio,video,plugdev,fuse xbmc > /dev/null 2>&1
adduser xbmc users > /dev/null 2>&1
@un1versal
un1versal / cd-dvd-automount.rules
Last active February 9, 2017 18:10
normal boot and mouting cd/dvd media.
# Rule automount on add|change|remove cd/dvd
ACTION!="add|change|remove", GOTO="cdrom_end"
# Define Device and attributes.
SUBSYSTEM=="block", KERNEL=="sr*", ENV{ID_PATH}=="pci-0000:00:0b.0-scsi-1:0:0:0", ATTRS{type}=="5", ATTR{removable}=="1", ATTR{events}=="media_change eject_request"
# Mount on device attached from cold boot and at device change
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mkdir -p '/media/cd-dvd'"
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 '/media/cd-dvd'"
@un1versal
un1versal / cd-dvd-automount-by-label.rules
Last active February 9, 2017 18:09
Boot time increases 3x but it mounts by label. a worthy note is the user that owns it is a large string of numbers.
# Rule automount on add|change|remove cd/dvd
ACTION!="add|change|remove", GOTO="cdrom_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="cdrom_end"
# Get label
PROGRAM=="/sbin/blkid -o value -s LABEL %N", ENV{dir_name}="%c"
# Use basename to correctly handle labels such as ../mnt/foo
PROGRAM=="/usr/bin/basename '%E{dir_name}'", ENV{dir_name}="%c"
ENV{dir_name}=="", ENV{dir_name}="usbhd-%k"
@un1versal
un1versal / kodi.service
Last active February 9, 2017 18:08
wget https://gist.github.com/uNiversaI/f853ed9f6b0d02bea88c/raw -O /etc/systemd/system/kodi.service
[Unit]
Description = Start Kodi using xinit
Wants = network-online.target
After = systemd-user-sessions.service network-online.target sound.target
[Service]
User = kodi
Group = kodi
Type = simple
PAMName = login
@un1versal
un1versal / dep.sh
Last active February 9, 2017 18:08
Dependency / ppa checkeradder
#!/bin/bash
if [ "$(id -u)" != "0" ]
then
echo -e '\e[1;31m'" ERROR! "$(basename $0)" must be run with sudo\n" 1>&2
echo -e '\e[1;36m'" sudo "$(basename $0)" <option>"'\e[0m' 1>&2
usage
exit 1
fi
%isJoinEnabled = $isEventEnabled(OnJoin, suppressJoinMsgs)
%isPartEnabled = $isEventEnabled(OnPart, suppressPartMsgs)
%isQuitEnabled = $isEventEnabled(OnQuit, suppressQuitMsgs)
%ProtectPing = $option(boolIgnoreCTCPPing)
%ProtectFinger = $option(boolIgnoreCTCPFinger)
%ProtectVersion = $option(boolIgnoreCTCPVersion)
%ProtectUserinfo = $option(boolIgnoreCTCPUserinfo)
%ProtectClientinfo = $option(boolIgnoreCTCPClientinfo)
%ProtectSource = $option(boolIgnoreCTCPSource)
%widget = $new(widget)
# This is the main container for other elements.
%widget->$setWindowTitle("This is the widget title")
%box=$new(vbox,%widget)
%buttons=$new(buttongroup,%widget)
%layout=$new(layout,%buttons)
%layout->$addWidget(%buttons,0,0)
%widget = $new(dockwindow)
# This is the main container for other elements.
%widget->$setWindowTitle("This is the widget title")
%box=$new(vbox,%widget)
%layout=$new(layout,%widget)
%layout->$addWidget(%box,0,0)
%label = $new(label,%box)
%label->$setText("This is a text label")
%widget->$setAllowedDockAreas("l","f")
# First we'll create the main tabWidget.
%qcheatsheet=$new(tabWidget)
%qcheatsheet->$setToolTip("Show me a nice tooltip")
%qcheatsheet->$setTabPosition(Top)
%qcheatsheet->$setGeometry(400,400,600,400)
%qcheatsheet->$setWindowTitle("Testme")
# Now we'll create the new widgets and put they in to the main tabWidget.
%firsttab=$new(vbox)
%secondtab=$new(vbox)
@-moz-document regexp("^https?://((gist|guides|help|raw|status|developer)\.)?github\.com((?!generated_pages\/preview).)*$"), domain("githubusercontent.com") {
/*! Github Dark Theme v1.14.105 (8/10/2016) *//*
* https://github.com/StylishThemes/GitHub-Dark
* http://userstyles.org/styles/37035
* License: https://creativecommons.org/licenses/by-sa/4.0/
*/
/* AGENT_SHEET */
body {
background-color: #222 !important;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAgMAAAANjH3HAAAACVBMVEUaGhohISElJSUh9lebAAAB20lEQVRIx4XWuZXDMAwE0C0SAQtggIIYoAAEU+aKOHhYojTrYP2+QfOW/5QIJOih/q8HwF/pb3EX+UPIveYcQGgEHiu9hI+ihEc5Jz5KBIlRRRaJ1JtoSAl5Hw96hLB1/up1tnIXOck5jZQy+3iU2hAOKSH1JvwxHsp+5TLF5MOl1/MQXsVs1miXc+KDbYydyMeUgpPQreZ7fWidbNhkXNJSeAhc6qHmHD8AYovunYyEACWEbyIhNeB9fRrH3hFi0bGPLuEW7xCNaohw1vAlS805nfsrTspclB/hVdoqusg53eH7FWot+wjYpOViX8KbFFKTwlnzvj65P9H/vD0/hibYBGhPwlPO8TmxRsaxsNnrUmUXpNhirlJMPr6Hqq9k5Xn/8iYQHYIuQsWFC6Z87IOxLxHphSY4SpuiU87xJnJr5axfeRd+lnMExXpEWPpuZ1v7qZdNBOjiHzDREHX5fs5Z