Skip to content

Instantly share code, notes, and snippets.

@exera
exera / change-codec.md
Created October 20, 2023 13:05 — forked from dvf/change-codec.md
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@exera
exera / README.md
Last active April 19, 2023 10:51 — forked from nomi-san/README.md
Appear offline on League Client

Guides

Run offlol.bat as administrator to appear offline, with any arg to appear online.

$ offlol.bat
Please run as administrator.

admin $ offlol.bat
You will appear offline on League Client.
@exera
exera / API.md
Created March 13, 2019 14:52 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@exera
exera / youtube-dl.md
Created July 29, 2018 12:24
Using youtube-dl to download courses from Pluralsight

Download courses from learning sites with youtube-dl

You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool

The flags you have to supply may vary depending on which site you make a request to.

You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials

Installation

@exera
exera / osx-software-update-urls.txt
Created July 19, 2018 08:33 — forked from geoff-nixon/osx-software-update-urls.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@exera
exera / react-datasheet-virtualized.jsx
Created May 25, 2018 05:06 — forked from cthurston/react-datasheet-virtualized.jsx
React-Datasheet with React-Virtualized
// DataSheet.js
render() {
const { sheetRenderer: SheetRenderer, rowRenderer: RowRenderer, cellRenderer,
dataRenderer, valueRenderer, dataEditor, valueViewer, attributesRenderer,
className, overflow, data, keyFn } = this.props
const { forceEdit } = this.state
return (
<span ref={ r => { this.dgDom = r } } tabIndex='0' className='data-grid-container' onKeyDown={ this.handleKey }>
@exera
exera / gist:9b53c2bff0a95a4b6312285a99e32f22
Created May 2, 2018 19:59 — forked from solenoid/gist:1372386
javascript ObjectId generator
var mongoObjectId = function () {
var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() {
return (Math.random() * 16 | 0).toString(16);
}).toLowerCase();
};
@exera
exera / gist:3bfdb2cf76fba033e3516c293b886924
Created March 14, 2018 11:07 — forked from alisterlf/gist:3490957
JAVASCRIPT:Remove Accents
function RemoveAccents(strAccents) {
var strAccents = strAccents.split('');
var strAccentsOut = new Array();
var strAccentsLen = strAccents.length;
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž';
var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz";
for (var y = 0; y < strAccentsLen; y++) {
if (accents.indexOf(strAccents[y]) != -1) {
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1);
} else
@exera
exera / mysql-docker.sh
Created January 17, 2018 08:06 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@exera
exera / youtubeID.js
Created August 24, 2017 09:37 — forked from takien/youtubeID.js
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);