Skip to content

Instantly share code, notes, and snippets.

View mortalis13's full-sized avatar

Roman mortalis13

View GitHub Profile
# Script to trigger ScrollLock key each 10 min
# Save as script.ps1 and run from PowerShell or from context menu "Run with PowerShell"
$WShell = New-Object -Com "Wscript.Shell"
while (1) {$WShell.SendKeys("{SCROLLLOCK}"); sleep 600}
# To execute the script in background, run it from the console
# To stop it, kill the powershell.exe process
/* -- For Profile/chrome/userChrome.css -- */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Hide tracking and security icons in address bar */
#tracking-protection-icon-container {
animation: none !important;
}
#tracking-protection-icon-container {

An example of how to write a LibreELEC OS image on a SD card.

  1. Download and unpack the image:
cd /sdcard
wget http://archive.libreelec.tv/LibreELEC-RPi2.arm-9.2.6.img.gz
gunzip -k LibreELEC-RPi2.arm-9.2.6.img.gz
  1. Enter to the super user mode, find the SD card device (usually mmcblk1),
# == commands
Ctrl+P - previous command in history
Ctrl+N - next command in history
printf "%d, %.2f\n" 5 3.2
type [cmd]
type ls -> 'alias'
type pwd -> 'shell builtin'
type expr -> '/usr/bin/expr'
data:text/html,<html><head><title>EDIT window</title></head><body onload="document.body.contentEditable='true';" onclick="if(event.shiftKey){this.contentEditable='false';this.innerHTML=this.innerHTML.replace(/(<\/a>)/ig,'$1<br>');event.preventDefault();}" height="99%" width="100%"></body></html>

Using the data: protocol, the snippet creates an inline page with HTML/JS code. Can be used as a bookmark. Shift+Click disables the contentEditable mode.

// == Deezer_FullScreen
javascript:(function(){
$('#page_sidebar').hide();
$('.abp-banner-container').hide();
$('.profile-header').hide();
$('#page_topbar').css('position', 'static');
$('#page_content').css('margin-left', 0);
$('.container').css('width', '100%');
$(".ellipsis").css('white-space', 'normal');
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://unpkg.com/jspdf@latest/dist/jspdf.min.js"></script>
<script src="https://unpkg.com/jspdf-autotable"></script>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script>
$(function(){
#
3 Inches of Blood
The 3rd Attempt
16
40 Watt Sun
1349
1914
A
-- addon.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.autostarttest" name="Autostart Test Script" version="1.0.1" provider-name="work">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
<extension point="xbmc.service" library="addon.py" start="startup">
</extension>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
/packages/compress/bzip2/package.mk
#PKG_URL="https://datapacket.dl.sourceforge.net/project/bzip2/bzip2-1.0.6.tar.gz"
PKG_URL="https://datapacket.dl.sourceforge.net/project/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"