Powershell script to to test simple lis
https://stackoverflow.com/questions/50973048/forking-git-repository-from-github-to-gitlab
-
Create an empty repository in Gitlab
-
Set the original Github repository as upstream:
git remote add upstream https://github.com/user/repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import numpy as np | |
import talib | |
import alpaca_trade_api as tradeapi | |
api = tradeapi.REST(key_id=<your key id>,secret_key=<your secret key>) | |
barTimeframe = "1H" # 1Min, 5Min, 15Min, 1H, 1D | |
assetsToTrade = ["SPY","MSFT","AAPL","NFLX"] | |
positionSizing = 0.25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import alpaca_trade_api as tradeapi | |
api = tradeapi.REST(key_id=<your key id>,secret_key=<your secret key>) | |
storageLocation = "<your folder location>" | |
barTimeframe = "1H" # 1Min, 5Min, 15Min, 1H, 1D | |
assetsToDownload = ["SPY","MSFT","AAPL","NFLX"] | |
iteratorPos = 0 # Tracks position in list of symbols to download | |
assetListLen = len(assetsToDownload) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @author Crend King | |
// @contributor Franz Alex Gaisie-Essilfie | |
// @version 2.4.20170620 | |
// @name Textarea Backup with expiry Fix | |
// @namespace http://users.soe.ucsc.edu/~kjin | |
// @description Fix @grant https://greasyfork.org/zh-CN/forum/discussion/8161 | |
// @description Retains text entered into textareas and contentEditables, and expires after certain time span. | |
// @include http://* | |
// @include https://* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys,os,glob,re,csv | |
try: | |
loglevel = int(os.environ["LOGLEVEL"]) | |
except: | |
loglevel = 1 | |
def Log(s, level=1): |
A class should have only a single responsibility.
Every class should have a single responsibility, and that responsibility should be entirely encapsulated. All its services should be narrowly aligned with that responsibility, this embrace the high cohesion.
Software entities should be open for extension, but closed for modification.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encoding: utf-8 | |
# | |
# idle.rb | |
# | |
# goal: | |
# Ruby script to test how to fetch IMAP mails with IDLE mode. | |
# IMAP IDLE allow a sort of "push" / "real-time" delivery. | |
# | |
# I used the script to test LATENCY (end-to-end delivery times) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Update fail2ban iptables with globally known attackers. | |
## Actually, runs 100% independently now, without needing fail2ban installed. | |
## | |
## /etc/cron.daily/sync-fail2ban | |
## | |
## Author: Marcos Kobylecki <[email protected]> | |
## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/ |
NewerOlder