Skip to content

Instantly share code, notes, and snippets.

@programmarchy
programmarchy / dns-dhcp.bat
Created August 24, 2011 14:52
Batch files for switching DNS servers between Google (8.8.8.8, 8.8.4.4) and DHCP
REM
REM Usage:
REM dns-dhcp.bat
REM
REM Description:
REM Configures DNS Servers with DHCP on interfaces listed below.
REM
REM To change interfaces, replace "name" with your interface names, or use "index" instead.
REM
REM To list the names and indices of your interfaces, run:
@oscarvs
oscarvs / 13eOBV
Last active February 21, 2021 01:45
Pinescript Indicators for TradingView
study(title="13ema of On Balance Volume", shorttitle="13eOBV")
src = close, len = input(13, minval=1, title="Length")
out = cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)
out2 = ema(out, len)
plot(out, color=orange, title="OBV")
plot(out2, title="EMA", color=gray)
@raulmoyareyes
raulmoyareyes / networkCommand.md
Last active November 2, 2024 09:51
Linux command to check Internet connection speed.

# View public IP

  • curl -s checkip.dyndns.org | sed 's#.Address: (.)</b.*#\1#'
  • wget -qO - icanhazip.com
  • curl ifconfig.me
  • curl ident.me
  • dig +short myip.opendns.com @resolver1.opendns.com
  • lynx -dump ifconfig.me | grep 'IP Address'
  • curl ipecho.net/plain
  • curl bot.whatismyipaddress.com
  • curl ipinfo.io
@JonnyWong16
JonnyWong16 / share_unshare_libraries.py
Last active July 21, 2024 17:48
Automatically share and unshare libraries for Plex users
# Run this script using "share" or "unshare" as arguments:
# To share the Plex libraries:
# python share_unshare_libraries.py share
# To unshare the Plex libraries:
# python share_unshare_libraries.py unshare
import requests
import sys
from xml.dom import minidom
@JonnyWong16
JonnyWong16 / plex_imdb_top_250_collection.py
Last active March 6, 2024 14:13
Automatically create an IMDB Top 250 collection in Plex using an existing movie library
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#
# Automated IMDB Top 250 Plex collection script by /u/SwiftPanda16
#
# *** Use at your own risk! ***
# *** I am not responsible for damages to your Plex server or libraries. ***
#
#------------------------------------------------------------------------------
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 17, 2024 04:56 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@hjbotha
hjbotha / free_ports.sh
Last active November 17, 2024 08:58
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
//@version=3
study("3MA")
plot(ema(close, 13), color=red, title="13 SMA")
plot(sma(close, 30), color=yellow, title="30 SMA")
plot(sma(close, 200), color=orange, title="200 SMA")
// Created by @pequet (https://www.tradingview.com/u/pequet) May 28 2018
// https://github.com/pequet/
// NOT FOR DISTRIBUTION
// @version=3
// Thanks Greg A! https://www.tradingview.com/u/Gregg_s/
// Candles are often missing for shitcoins on tradingview and sometimes in not-so-small resolutions
// https://www.tradingview.com/script/Cp6sqEAN-Candle-Thief-v1-0-TradingView-Anomalies/
// Implications:
// Created by @pequet (https://www.tradingview.com/u/pequet)
// https://github.com/pequet/
// NOT FOR DISTRIBUTION
// @version=3
study(title="Institutional Bias", shorttitle="IB", overlay=true)
src = input(close, type=source, title="Source")
ibBullCond = resolution=='D' ? ema(src, 9) > ema(src, 18) : security(tickerid, 'D', ema(src, 9) > ema(src, 18))