Skip to content

Instantly share code, notes, and snippets.

View dancodery's full-sized avatar
🤓

Daniel Gockel dancodery

🤓
View GitHub Profile
@dancodery
dancodery / bitcoin-burn-address-generator.py
Created September 23, 2021 21:16
This script generates bitcoin coin burning addresses with a custom bitcoin address prefix. The symbols at the end of the btc burning address are made for checksum verification.
#!/usr/bin/env python
"""bitcoin-burn-address-generator.py: This script generates bitcoin coin burning addresses with a custom bitcoin address prefix.
The symbols at the end of the burning btc address are made for checksum verification."""
__author__ = "Daniel Gockel"
__website__ = "https://www.10xrecovery.org/"
import sys
@dancodery
dancodery / bitcoin-address-validator.py
Last active September 23, 2021 21:56
This script validates Bitcoin addresses by calculating and comparing checksums as well as displaying the Bitcoin address type.
#!/usr/bin/env python
"""bitcoin-address-validator.py: This script validates Bitcoin addresses by
calculating and comparing checksums as well as displaying the Bitcoin address type."""
__author__ = "Daniel Gockel"
__website__ = "https://www.10xrecovery.org/"
from base58 import b58decode
from hashlib import sha256
@dancodery
dancodery / milliseconds_countdown.php
Created June 30, 2016 14:02
Website launch countdown in milliseconds. Counts down from a specific date in PHP and jQuery.
<div id="timer"></div>
<script>
var millis = <?php
$timestamp = strtotime('2020-07-30');// your launch date
$difference = $timestamp - time();// difference in seconds
echo ($difference * 1000); ?>;
function displaytimer(){
$('#timer').html(millis);
@thewinterwind
thewinterwind / Stock.php
Created June 23, 2014 11:02
Entire Stock class for tutorial on using PHP with the Yahoo Finance API
<?php namespace SS\Stock;
use DB, File, Cache, Input, Response;
class Stock {
public function __construct()
{
ini_set("memory_limit", "-1");
set_time_limit(0);
@thewinterwind
thewinterwind / php-yahoo-finance.php
Created June 21, 2014 14:38
Lesson 8 - PHP & Yahoo Finance API
<?php namespace SS\Stock;
use DB, File, Cache;
class Stock {
public function __construct()
{
ini_set("memory_limit", "-1");
set_time_limit(0);
@thewinterwind
thewinterwind / StoringController.php
Last active June 13, 2016 13:56
Code to count streaks in PHP (used with Yahoo API tutorial)
<?php
class StoringController extends BaseController {
public function store_streaks()
{
$date = date('Y-m-d');
$stocks = DB::table('stocks')->select('symbol')->orderBy('symbol', 'asc')->get();
@CoinWhisperer
CoinWhisperer / burn-btc
Last active November 2, 2021 17:38
A simple python program to create bitcoin burn addresses.
#! /usr/bin/env python
"""
burn-btc: create a bitcoin burn address
By James C. Stroud
This program requries base58 (https://pypi.python.org/pypi/base58/0.2.1).
Call the program with a template burn address as the only argument::
@thewinterwind
thewinterwind / validate_url.js
Created October 17, 2013 07:12
Validating a URL with Javascript
// I didn't write this function, only modified it slightly. It works well though!
function valid_url(str) {
var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
'(\\#[-a-z\\d_]*)?$','i'); // fragment locator