Skip to content

Instantly share code, notes, and snippets.

View danielmcclure's full-sized avatar

Daniel McClure danielmcclure

View GitHub Profile
@khaledMohammed000
khaledMohammed000 / index.php
Created February 3, 2017 07:03
code on the sub domain url
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset="utf-8">
<title>Disqus for AMP</title>
<meta name="viewport" content="width=device-width,minimum-scale=1">
<style>
html, body {
margin: 0;
/*
# Time Locked Multisig
This is a different twist on the Congress DAO / Multisig. Instead of every action requiring the approval of an X number of members, instead any transactions can be initiated by a single member, but they all will require a minimum amount of delay before they can be executed, which varies according to the support that transaction has. The more approvals a proposal has, the sooner it can be executed. A member can vote against a transaction, which will mean that it will cancel one of the other approved signatures. In a 5 members DAO, each vote means the time to wait dimishes by 10x.
This means that if you don't have urgency, one or two signatures might be all you need to execute any transaction. But if a single key is compromised, other keys can delay that transaction for years, making sure that the main account is emptied out way before that.
Transaction delays:

Clarifying The "Free ETC" Coinbase Confusion

I do not work for Coinbase and do not in any way speak for or represent them. This post was hastily written and is probably full of typos!

This is my attempt to clarify the possibilities that might be going on, based on various Coinbase employee statements.

First, I should highlight that there has been a good amount of confusion created by the replay attacks going on between the "two" Ethereum chains. So much so that it seems to have confused just about everyone, including me, as to the details of what's going on with Coinbase's ETH/ETC (and other ETH/ETC).

I put "two" in quotes because at the moment it's more like there are "1.25 Ethereum chains" because of the replay attacks, which are causing almost every transaction to get mirrored on the other chain. Replay attacks are possible because Ethereum's hard fork did not take steps to make Ethereum transactions invalid on the original chain. Instead, all transactions are valid on both chains unless specia

@JeffreyBPetersen
JeffreyBPetersen / PermanentDAOHardforkConditionalTransfer.sol
Created July 17, 2016 20:38
Contract to protect against replay attacks after the current Ethereum fork
contract PermanentDAOHardforkConditionalTransfer {
/* whether this contract is currently being used on the forked chain, it defaults to false */
bool public forked;
/* whether the value of "forked" has been set and locked yet, it defaults to false */
bool public readyAndLocked;
/* record the status of the fork and mark this contract ready to be used for transfers */
contract ethExchange {
address public public ethClassicWithdrawer;
address public public ethForkWithdrawer;
bool public accepted;
address public refundContract = '0xbf4ed7b27f1d666546e30d74d50d173d20bca754';
function ethExchange(uint amountToExchange) {
ethClassicWithdrawer = msg.sender;
}
@marcfowler
marcfowler / Bump.js
Last active May 4, 2017 01:17
ThriveCart: Help: Facebook Pixel code
<script>fbq('track', 'Purchase', {value: _thrive_order.order.bump.total_readable, currency: _thrive_order.order.currency});</script>
@marcfowler
marcfowler / Bump.js
Last active August 15, 2020 12:27
ThriveCart: Help: Google Analytics Ecommerce code
<script>
(function() {
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': _thrive_order.order.id,
'revenue': _thrive_order.order.total,
'tax': _thrive_order.order.tax,
'currency': _thrive_order.order.currency
});
@jawinn
jawinn / primary_category.php
Last active December 8, 2022 21:42
Display Primary Category (Yoast's WordPress SEO)
<?php
/**
* Get the Yoast primary category from its post meta value, and displays it, with HTML markup.
* If there is no primary category set, it displays the first assigned category.
*
* @param boolean $useCatLink Whether to link the category, if it exists
* @return void
*/
function yourtheme_display_yoast_primary_category( $useCatLink = true ) {
@ezimuel
ezimuel / sign.sh
Created March 14, 2016 15:50
Sign and verify a file using OpenSSL command line tool. It exports the digital signature in Base64 format.
#!/bin/bash
# Sign a file with a private key using OpenSSL
# Encode the signature in Base64 format
#
# Usage: sign <file> <private_key>
#
# NOTE: to generate a public/private key use the following commands:
#
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem