Skip to content

Instantly share code, notes, and snippets.

View darocha's full-sized avatar

Marcelo Darocha darocha

View GitHub Profile
@darocha
darocha / Wistia-download-videos.md
Created June 1, 2025 23:36 — forked from szepeviktor/Wistia-download-videos.md
Download Wistia videos - Please do not misuse it!

Download Wistia videos

  1. right-click on the playing video, select Copy link
  2. find Wistia video ID in the copied link e.g. wvideo=tra6gsm6rl
    • alternative: look for e.g. hashedId=tra6gsm6rl in the page source
  3. load http://fast.wistia.net/embed/iframe/ + video ID in your browser
  4. look for "type":"original" in the page source and copy the URL from the next line e.g. "url":"http://embed.wistia.com/deliveries/129720d1762175bcd8e06dcab926ec76ad38ff00.bin"
  • alternative: look for "type":"hd_mp4_video"
@darocha
darocha / config.json
Created April 17, 2024 18:36 — forked from doingthisalright/config.json
Create Solana NFT Collection using Candy Machine V3: Config file for the video: https://youtu.be/0KHv1dMV8zU
{
"number": 10,
"symbol": "NB",
"sellerFeeBasisPoints": 500,
"isMutable": true,
"isSequential": false,
"creators": [
{
"address": "3icSnuo5kFS7BE5HPXLMrz1x1duK7bt69PJ4vvg2LDV9",
"share": 100
@darocha
darocha / NFTLaunchUsingCM3.sh
Created April 17, 2024 18:36 — forked from doingthisalright/NFTLaunchUsingCM3.sh
Create Solana NFT Collection using Candy Machine V3: Commands used in the video: https://youtu.be/0KHv1dMV8zU
# Launching NFT Collection using Candy Machine V3
# https://youtu.be/0KHv1dMV8zU
# Setup Solana Tool Suite
solana --version
solana-keygen --version
# Setup Sugar alpha version
chmod 755 sugarCM3
./sugarCM3 --version
@darocha
darocha / CryptoKitties.sol
Created March 30, 2021 01:12 — forked from yogin/CryptoKitties.sol
CryptoKitties
// Copied from: https://ethfiddle.com/09YbyJRfiI
// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Maze.Logic
{
[Flags]
public enum Directions
{
@darocha
darocha / gist:81f5ec8d16b1740d3400b934aa24cd2d
Created July 25, 2020 01:26 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@darocha
darocha / gist:42a6fcd229bd78fcc2dafb89d0e2c65a
Created June 19, 2020 23:20 — forked from yoshyoshi/gist:5a35a23ac263747eabc70906fd037ff3
download and store OHLCV data into a CSV
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)
@darocha
darocha / MeanReversionPaperOnly.cs
Created June 19, 2020 23:12 — forked from ttt733/MeanReversionPaperOnly.cs
Mean Reversion Trading Algorithm (Alpaca)
using Alpaca.Markets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Examples
{
class MeanReversionPaperOnly
{
@darocha
darocha / hold-tlt-version.py
Created June 19, 2020 23:10 — forked from a-r-d/hold-tlt-version.py
QuantConnect - simple MACD strategy against SPY, 50/150 day cross, long and short, leverage is none
import numpy as np
### <summary>
### Basic template algorithm simply initializes the date range and cash. This is a skeleton
### framework you can use for designing an algorithm.
### </summary>
class BasicTemplateAlgorithm(QCAlgorithm):
'''Basic template algorithm simply initializes the date range and cash'''
def Initialize(self):
@darocha
darocha / RSAKeys.cs
Created August 8, 2019 15:42 — forked from therightstuff/RSAKeys.cs
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{