Skip to content

Instantly share code, notes, and snippets.

View florinel-chis's full-sized avatar

Florinel Chis florinel-chis

  • Magendoo
  • Bucharest, Romania
View GitHub Profile
@florinel-chis
florinel-chis / peer-feedback.html
Created September 13, 2023 15:14
Team Member Evaluation - aimed at Software Engineers and DevOps Engineers. It is a tool to help you evaluate your team members and provide them with feedback. It is not meant to be a replacement for regular 1:1s and other feedback mechanisms. It is meant to be used as a starting point for a conversation.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Team Member Evaluation</title>
<style>
body {
padding: 10%;
@florinel-chis
florinel-chis / TSLA_3_years_data.py
Created September 13, 2023 11:18
yfinance get TSLA daily data for the past 3 years
import yfinance as yf
import pandas as pd
from datetime import datetime, timedelta
# Define the ticker symbol
ticker_symbol = "TSLA"
# Calculate the date from 3 years ago
end_date = datetime.today().strftime('%Y-%m-%d')
start_date = (datetime.today() - timedelta(days=3*365)).strftime('%Y-%m-%d')
@florinel-chis
florinel-chis / tesla_daily_buy.py
Created September 13, 2023 11:15
Buy 1 tesla share a day and TP at 10k backtesting 3 years
import pandas as pd
# Load the data from the CSV file
data = pd.read_csv("TSLA_3_years_data.csv")
# Initialize variables
total_shares = 0
cumulative_cost = 0.0
total_profit = 0.0
data['Yesterday_Close'] = data['Close'].shift(1)
@florinel-chis
florinel-chis / binance_get_usdt_trading.py
Created April 21, 2022 11:39
get usdt trading pairs from binance
from binance.client import Client
def get_binance_exchange_info():
client = Client()
info = client.get_exchange_info()
for c in info['symbols']:
if c['quoteAsset']=='USDT' and c['status']=="TRADING":
print(c['symbol'])
if __name__ == "__main__":
@florinel-chis
florinel-chis / mailhog-vhost-apache-mod-proxy
Created November 19, 2021 08:22
expose mailhog publicly with basic auth
<VirtualHost *:80>
# Name for your virtualhost
ServerName mailhog.myawesomedomain.com
# Proxy config
ProxyPreserveHost On
ProxyRequests Off
# Websocket proxy needs to be defined first
ProxyPass "/api/v2/websocket" ws://localhost:8025/api/v2/websocket
@florinel-chis
florinel-chis / python-shell-history.py
Created March 22, 2021 10:29
python shell history - one liner
import readline; print('\n'.join([str(readline.get_history_item(i + 1)) for i in range(readline.get_current_history_length())]))
@florinel-chis
florinel-chis / gist:b8f66682d867c1aa2058ce35aba2c62b
Created February 11, 2021 15:06
python chromedriver and tor
from selenium import webdriver
chromdriver_path='/path/to/chromedriver'
PROXY = "socks5://localhost:9050"
options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=%s' % PROXY)
driver = webdriver.Chrome(chrome_options=options, executable_path=chromdriver_path)
driver.get("http://check.torproject.org")
@florinel-chis
florinel-chis / Magento-Zend_Db_Statement_Pdo_execute
Created January 17, 2014 17:42
Magento - Zend_Db_Statement_Pdo::_execute - for developers
#Zend_Db_Statement_Pdo::_execute
public function _execute(array $params = null)
{
try {
if ($params !== null) {
return $this->_stmt->execute($params);
} else {
return $this->_stmt->execute();
}
@florinel-chis
florinel-chis / cloudflare-purge.sh
Created October 5, 2013 14:11
purge file on cloudflare
if [ -z "$1" ]; then
echo "Usage: $0 http://your.domain.com/url"
exit 0
fi
#get this from Account section in Cloudflare
TOKEN="YOUR_TOKEN_HERE"
EMAIL="YOUR_EMAIL_HERE"
DOMAIN="YOUR_DOMAIN_HERE"
curl https://www.cloudflare.com/api_json.html \
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql