Skip to content

Instantly share code, notes, and snippets.

View vincenavarro's full-sized avatar
:octocat:
Burning Branches

Vince Navarro vincenavarro

:octocat:
Burning Branches
View GitHub Profile
@vincenavarro
vincenavarro / keychron_k2.adoc
Last active September 24, 2022 13:40 — forked from judaew/keychron_k2.adoc
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@vincenavarro
vincenavarro / destructuring.js
Created April 5, 2020 01:07 — forked from mikaelbr/destructuring.js
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@vincenavarro
vincenavarro / index.js
Created May 21, 2019 15:01
Simple, complete example of a bot in Discord.js
// Load up the discord.js library
const Discord = require("discord.js");
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
const client = new Discord.Client();
// Here we load the config.json file that contains our token and our prefix values.
const config = require("./config.json");
@vincenavarro
vincenavarro / git-author-rewrite.sh
Last active February 3, 2019 19:47 — forked from octocat/git-author-rewrite.sh
Mutli-email replacement for git commits.
#!/bin/sh
git filter-branch -f --env-filter $'
OLD_EMAILS="
[email protected]
[email protected]
"
CORRECT_NAME="New Name"
CORRECT_EMAIL="[email protected]"
for EMAIL in ${OLD_EMAILS}; do