Skip to content

Instantly share code, notes, and snippets.

@mrkskwsnck
mrkskwsnck / git-prune.sh
Created May 2, 2024 12:24 — forked from peterwwillis/git-prune.sh
Prune Git's local orphan references, merged feature branches, remote tracking references, and more
#!/bin/bash
# Prune local orphan refs
git prune -v
# Deletes all stale (local) remote-tracking branches under origin.
# These stale branches have already been removed from the remote repository
# referenced by <name>, but are still locally available.
git remote prune origin
@mrkskwsnck
mrkskwsnck / EvilMouse.js
Created May 1, 2024 20:38 — forked from kwasmich/EvilMouse.js
UserScript for browser to enable Disney Plus on Linux
// ==UserScript==
// @name Enable Disney Plus on Linux
// @description This is your new file, start writing code
// @match *://*.disneyplus.com/*
// ==/UserScript==
Object.defineProperty(navigator, "userAgent", { value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36", configurable: true, enumerable: true, writable: true });
@mrkskwsnck
mrkskwsnck / Skip YouTube Ads.js
Created December 30, 2022 12:17 — forked from kwasmich/Skip YouTube Ads.js
Script for Userscripts browser extension to skip ads on Youtube.
// ==UserScript==
// @name Skip YouTube Ads
// @description This is your new file, start writing code
// @match *://*.youtube.com/*
// ==/UserScript==
function skipAd() {
const adPlaying = document.body.querySelector(".ad-showing");
if (!adPlaying) {
@mrkskwsnck
mrkskwsnck / README.md
Created March 26, 2016 15:33 — forked from trieloff/README.md
A command line alternative to LampStealer

The LampStealer app for Hue does not work with newer versions of the bridge, as the API has changed. This shell script works with fewer dependencies and achieves the same. Install jq and run the shell script after pushing the big button on the bridge.

#!/bin/bash
# cpustatus
#
# Prints the current state of the CPU like temperature, voltage and speed.
# The temperature is reported in degrees Celsius (C) while
# the CPU speed is calculated in megahertz (MHz).
function convert_to_MHz {
let value=$1/1000
echo "$value"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sched.h>
if [ -f "${rvm_path}/scripts/rvm" ]; then
source "${rvm_path}/scripts/rvm"
if [ -f ".rvmrc" ]; then
source ".rvmrc"
elif [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then
rvm use `cat .ruby-version`@`cat .ruby-gemset`
elif [ -f ".ruby-version" ]; then
rvm use `cat .ruby-version`