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 / tradingview-buy-sell-helper.js
Last active November 23, 2020 23:37
TradingView Buy/Sell Helper
async function postData(url = '', data = {}) {
const response = await fetch(url, {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
credentials: 'include', // include, *same-origin, omit
redirect: 'follow', // manual, *follow, error
referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
body: JSON.stringify(data) // body data type must match "Content-Type" header
});
return response.json(); // parses JSON response into native JavaScript objects
@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 / styles.css
Last active July 5, 2020 10:12
Cloud9 IDE Styles
* {
font-family: SauceCodePro Nerd Font!important;
/*-webkit-font-smoothing : none!important;*/
}
.c9-menu-btn, .c9menu > .menu_item {
font-size: 15px;
padding-top: 6px;
-webkit-font-smoothing : none;
-webkit-font-smoothing : none!important;
@F1LT3R
F1LT3R / git-i-love-commands-and-config.md
Last active October 24, 2019 22:06
Git I Love - Commands & Config

#Git Commands I Love

##Reset & Clean

git reset HEAD --hard

A hard reset may leave files behind which are now untracked because of a removal.

To check whether anything needs cleaning up do a trial clean like so:

@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);
});
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