Skip to content

Instantly share code, notes, and snippets.

View sidneys's full-sized avatar

sidneys sidneys

  • Germany
View GitHub Profile
@blizzy78
blizzy78 / remove-golem-pre-video-ads.js
Last active August 16, 2016 12:05
Remove pre-video ads from golem.de
// ==UserScript==
// @name Remove Golem.de Pre-Video Ads
// @namespace http://blizzy.de/
// @version 1.0
// @description Removes pre-video ads from videos on golem.de
// @match http://*.golem.de/*
// @copyright 2014-2016, Maik Schreiber
// @require //code.jquery.com/jquery-3.1.0.min.js
// @grant none
// ==/UserScript==
@nicolas-t
nicolas-t / facebook-read-status.user.js
Last active January 17, 2017 03:03
Block facebook's "read status" notification on chat. Your contact won't know if you read his message or not.
// ==UserScript==
// @name Facebook read status
// @description block facebook's "read status" notification on facebook chat.
// @namespace frs
// @include http://www.facebook.com/*
// @include https://www.facebook.com/*
// @grant none
// @version 1
// ==/UserScript==
@jwmann
jwmann / TrashSongFromVLC.scpt
Last active January 20, 2018 03:06
This is an AppleScript to allow the ability to select a song from a VLC playlist and Trash the song from your Disk and Remove it from the Playlist. It has only been tested for a single song selection but can accomodate playlists of any size.
global songDeleted
global selectedSong
global safetyCheck
# This variable is used as a boolean to see if a file has been deleted or not
set songDeleted to false
# This variable is used to store the alias location of the song to be deleted / added
set selectedSong to false
# This variable is used to track whether we've attempted a safe workaround to deleting a current song
set safetyCheck to false
@sidneys
sidneys / nvm_node_updater.sh
Last active July 25, 2020 13:54
Node & NPM Global Updater: Updates NodeJS, NPM and all global Packages to 'latest' in one step
#!/bin/bash
# NVM_NODE_UPDATER
# v2.0.0
#
# Makes keeping NVM-managed, global NodeJS installations up-to-date a breeze.
# First, the global NodeJS installation is updated to 'latest'.
# Second, all global NPM packages are migrated, then also updated to 'latest'.
# Requires the Node Version Manager (https://github.com/creationix/nvm).
#
@SteveBenner
SteveBenner / macfix4-disable-crash-reporter.rb
Created October 12, 2014 15:34
Mac fix - Disable CrashReporter and prevent it from launching
#!/usr/bin/env ruby
#
# Mac fix 4 - Disable CrashReporter
#
# CrashReporter is a daemon that monitors for crashes and generates a report (duh) when they occur.
# If an application (such as Finder) become stuck in an infinite crash loop, then sometimes it's
# desirable to just turn off CrashReporter entirely, as it will continually generate processes in
# the background which spew errors and logs, resulting in massive overhead to your system resources.
#
# DIAGNOSING:
/**
* Author: JCloudYu
* Create: 2020/05/07
**/
(()=>{
"use strict";
const _PUSH_STATE = window.history.pushState;
const _REPLACE_STATE = window.history.replaceState;
@sidneys
sidneys / de.sidneys.applescript.toggle-macos-accessibility-keyboard.scpt
Last active May 26, 2021 15:08
AppleScript | Toggle Accessibility Keyboard (macOS)
(*
* toggle-macos-accessibility-keyboard
* applescript
*
* description:
* macOS automation script to toggle the macOS Accessibility Keyboard.
* Shows and hides the keyboard depending on its current state.
*
* author: sidneys
* homepage: http://sidneys.github.io
@kgn
kgn / gist:1558664
Created January 4, 2012 05:37
Animated NSTableView Scrolling
// Thanks to CuriousKea for getting this started!
// http://stackoverflow.com/a/8480325/239380
- (void)scrollRowToVisible:(NSInteger)rowIndex animate:(BOOL)animate{
if(animate){
NSRect rowRect = [self rectOfRow:rowIndex];
NSPoint scrollOrigin = rowRect.origin;
NSClipView *clipView = (NSClipView *)[self superview];
scrollOrigin.y += MAX(0, round((NSHeight(rowRect)-NSHeight(clipView.frame))*0.5f));
NSScrollView *scrollView = (NSScrollView *)[clipView superview];
@nickrw
nickrw / volsay.sh
Created April 19, 2013 12:43
volsay: Wrapper around OSX's `say' command, which sets the system volume to the requested level, then restores volume / mute state once speech is complete.
#!/bin/bash
function usage() {
echo "usage: $0 <volume (0-100)> <say args...>"
echo
echo "Unmutes and sets the system volume to volume%, passing the remaining"
echo "arguments to the OSX \`say' command, restoring volume / mute setting"
echo "to previous values after the speech has completed."
exit 1
}