Skip to content

Instantly share code, notes, and snippets.

@fa7ad
fa7ad / yt-loudness.user.js
Last active April 24, 2024 11:04 — forked from WouterG/tampermonkey-script.js
Disable youtube volume normalization (allow true video 100% volume)
// ==UserScript==
// @name YouTube Disable Normalization
// @namespace https://gist.github.com/fa7ad/fa995474f5cb9fe91fb209686881373d
// @version 0.2
// @description Allows true 100% volume on youtube videos.
// @author Wouter Gerarts
// @match https://www.youtube.com/*
// @match https://youtube.com/*
// @grant none
// ==/UserScript==
@mchaker
mchaker / stable-diffusion-links.md
Last active July 29, 2023 21:41
stable-diffusion-links: useful optimizations
@Juul
Juul / openwrt_dsa_vlan_config.md
Created April 20, 2021 14:03
Overview of VLAN config on OpenWRT using DSA

This a quick guide to configuring tagged VLAN using DSA on OpenWRT routers with a switch and only a single physical ethernet port.

This was tested on a Xiaomi Redmi AC2100 (MT7621 chipset) running OpenWRT Snapshot from April 19th 2021.

Here's how you make an interface lan3.2 which will send tagged packets on lan port 3. This assumes the lan port 3 interface is called lan3.

config interface 'pub'
        option ifname 'lan3.2'
@Jiab77
Jiab77 / enable-2.1-audio-output-in-pulseaudio.md
Last active August 13, 2022 06:22
Enable 2.1 audio output in PulseAudio

Enable 2.1 audio output in PulseAudio

I'm using a 2.1 speakers kit from Logitec but most of the time it is always detected as 2.0... 😒

So I decided to make some research and found a solution that works everytimes (on Ubuntu based distribs).

It seems to work also on Arch Linux, see comment from @ilikenwf.

Before patching

As you can see, my audio output is not patched.

@LogIN-
LogIN- / add_trackers.sh
Created August 10, 2017 22:04
Transmission CLI add trackers in BULK
#!/bin/bash
# I was looking for a way to add/modify all trackers in all torrents in my remote transmission instance.
# So I had bunch of old torrents like 500 of them with mostly broken outdated trackers.
# This is a small helper script that will loop over all your torrents and add trackers that finds on torrentz domain.
# I came out on this: https://github.com/Entware-ng/Entware-ng/wiki/Using-Transmission#adding-more-trackers little script and modify it a bit.
# Please modify this script that it suits your environment.
base_url='https://torrentz2.is'
pattern='announcelist_[0-9]+'
@gabonator
gabonator / camera.md
Created June 4, 2016 13:48
Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Video stream url for VLC/DVR:

  • rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100

Telnet access

  • telnet 192.168.1.10 23
  • Localhost login: root
  • Password: xmhdipc
@ilikenwf
ilikenwf / Session_hybrid.php
Last active August 29, 2015 14:06
Hybrid Cookie or DB session driver for codeigniter - allows for API or cookie based auth
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
* Licensed under the Open Software License version 3.0
*
@ilikenwf
ilikenwf / stylish.css
Last active August 5, 2017 14:22
Disable Ugly Unatialiased Fonts - Firefox and Stylish While Retaining Icon Fonts - Adapted from https://support.mozilla.org/en-US/questions/947228
@font-face {font-family: "Droid Sans"; src: local("Tahoma");}
@font-face {font-family: "noto"; src: local("Tahoma");}
@font-face {font-family: "Arial Negreta"; src: local("Arial");}
@font-face {font-family: "Droid Sans"; font-weight: bold; src: local("Tahoma Bold");}
@font-face {font-family: "Droid Serif"; src: local("Tahoma");}
@font-face {font-family: "Droid Serif"; font-weight: bold; src: local("Tahoma Bold");}
@font-face {font-family: "Droid Serif"; font-style: italic; src: local("Tahoma Italic");}
@font-face {font-family: "opensans"; src: local("Tahoma");}
@font-face {font-family: "open_sans"; src: local("Tahoma");}
@font-face {font-family: "open_sans"; font-weight: bold; src: local("Tahoma Bold");}
@stevenwoodson
stevenwoodson / MY_DB_mysql_driver.php
Created December 27, 2012 06:10
Codeigniter DB - Insert on Duplicate Update method Generates a platform-specific insert string from the supplied data, MODIFIED to include ON DUPLICATE UPDATE
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class MY_DB_mysql_driver extends CI_DB_mysql_driver {
final public function __construct($params) {
parent::__construct($params);
}
/**
* Insert_On_Duplicate_Update_Batch
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1