Skip to content

Instantly share code, notes, and snippets.

View F1LT3R's full-sized avatar
🌱
Growing Things

Alistair MacDonald F1LT3R

🌱
Growing Things
View GitHub Profile
@F1LT3R
F1LT3R / clone
Created October 13, 2020 04:57
silent.os
#!/bin/bash
echo "hi"
@F1LT3R
F1LT3R / ytm3.sh
Last active September 11, 2020 19:48
Split long YouTube Videos into 5min MP3 Segments
#!/bin/bash
# USAGE: ytm3 https://www.youtube.com/watch\?v\=rQLBitV69Cc
# DESCRIPION: Download Audio from YouTube videos, Convert to split MP3s (5 Min)
# PURPOSE: Studying w/ iPod shuffle
# PRE-REQS: Node.js, YTDL, FFMPEG
# Author: F1LT3R.io
for URL in $@
do
@F1LT3R
F1LT3R / test.js
Last active August 11, 2020 13:39
Hash Map Perf.
const hash = {
a: 1,
b: 1,
c: 1,
d: 1,
e: 1,
g: 1,
h: 1,
j: 1,
k: 1,
@F1LT3R
F1LT3R / await-promise.js
Created February 27, 2019 16:54
Awaiting a promise that may throw an error
var wait = (ms) =>
new Promise((resolve, reject) => {
if (Math.random() > 0.5) {
return reject('NOPE!');
}
setTimeout(() => {
resolve('Done!');
}, ms);
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@F1LT3R
F1LT3R / proxy.js
Created April 28, 2018 04:08 — forked from fracasula/proxy.js
Node.js basic example for proxy to http server
/**
* Once this is running open your browser and hit http://localhost
* You'll see that the request hits the proxy and you get the HTML back
*/
'use strict';
const net = require('net');
const http = require('http');
@F1LT3R
F1LT3R / .ackrc
Last active April 4, 2018 17:18
.ackrc
--no-group
--color
--ignore-directory=is:node_modules
--ignore-file=is:Markserv.log
--ignore-file=is:npm.debug.*
--type-set=css:ext:less
--type-set=css:ext:scss
@F1LT3R
F1LT3R / aws-config.js.env
Last active September 15, 2017 14:26 — forked from ddewaele/simple-cognito-auth.js
AWS Cognito Auth for Node.js
module.exports = {
"AWS": {
"Region": "us-east-1",
"ClientId": "304laiduvj1ld6ls8s2lsjfipa",
"UserPoolId": "us-east-1_aaksjfhTo",
"IdentityPoolId": "us-east-1:018b7af4-9384-8afe-019d-013cc0192d001",
"LoginEndpoint": "cognito-idp.us-east-1.amazonaws.com/us-east-1_aaksjfhTo"
}
}
@F1LT3R
F1LT3R / binary-search-core.ts
Last active August 27, 2017 00:25
Binary Search Typescript
enum FailExits {
ologn,
nochop
}
let exit = FailExits.ologn
let iterCount:number
let maxIterations: number
const compare = (target: number, ary: number[], start: number, end: number): number[] | number | boolean => {
@F1LT3R
F1LT3R / Karabiner-Elements-Caps-Move-Vim-complex_modifications-rules.json
Last active August 10, 2017 16:28
Karabiner-Elements - Caps Move Vim - complex_modifications rules
{
"title": "Caps Move Vim",
"rules": [
{
"description": "Change Capslock + H/J/K/L to Arrow Keys",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "i",