Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Smith iamchrissmith

  • Earth
View GitHub Profile
View canCallError.md
SPEC ERROR: /Users/chrissmith/Projects/k-ds-guard/out/specs/617021af8de987b5d4f7d2a2afac1a72fd17c33b75cdc5f1440117d544b77a8e.k Location(12,3,180,36)
==================================
Success execution paths: 0
Failed execution paths: 1
Paths in progress: 1
Longest path: 131 steps
Stats for each phase, time, used memory, implicit main GC time percentage:
Total                 :  218.558 s,	  541 MB, gc:  0.649 %
  Parsing             :  206.018 s,	  135 MB, gc:  0.610 %
@iamchrissmith
iamchrissmith / delegatecall.md
Created Apr 1, 2019
Understanding msg.sender with delegatecall
View delegatecall.md

To evaluate the value of msg.sender when using solidity/assembly's delegatecall:

We start out with 3 contracts:

pragma solidity ^0.5.7;

contract ScratchPadActions {
    event SenderActions(address contractAddress, address sender, address second);
    function relay(ScratchPad2 second) public returns (address) { 
        emit SenderActions(address(this), msg.sender, address(second));
View Seth Token commands.md

SETH Examples

Setup

Need .sethrc for the blockchain you want to connect to. For this demo we'll be using dapp testnet and the setup-testnet.sh script from icetan. This script gets and sets some env variables for us:

  • ETH_FROM
  • ETH_PASSWORD
  • ETH_KEYSTORE
  • ETH_RPC_URL
View keybase.txt
### Keybase proof
I hereby claim:
* I am iamchrissmith on github.
* I am iamchrissmith (https://keybase.io/iamchrissmith) on keybase.
* I have a public key ASBEY_D0Rw2H43GFLUTnzqD-st2amXuR4ph-PtMLgMVeTAo
To claim this, I am signing this object:
@iamchrissmith
iamchrissmith / pd_pre-work.md
Last active Mar 7, 2017
Pre-work on Professional development
View pd_pre-work.md

Directions:

For the activities listed below, please create a gist on GitHub to capture your reflections for each of these 3 parts.

  1. Read through this post from Red Pill Programming to get a sense of the different mindsets you'll want to consider in your new career: The Software Engineer Framework: 8 Ways to Become a Better Software Engineer.

    • Approximate reading time: 15 minutes
    • After reading, please write a reflection (4-6 sentences) on your takeaways from the post.
  2. Mentioned in the first reading, the idea of a strong checklist is the focus in the second reading. Read through and/or listen to this interview with Atul Gawande (author of the Checklist Manifesto). It includes an excerpt from his book, which is optional reading.

@iamchrissmith
iamchrissmith / prework.md
Created Jan 4, 2017 — forked from mbburch/prework.md
An example template for your Turing pre-work Gist
View prework.md

Turing School Prework

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

@iamchrissmith
iamchrissmith / gist:e82b31603a1fbfb78e4f
Created Mar 2, 2015
Escape Button - Link to Google
View gist:e82b31603a1fbfb78e4f
<a href='https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&sqi=2&ved=0CB4QFjAA&url=http%3A%2F%2Fwww.google.com%2F&ei=8e3zVKuCL4-zyATQ04HYCQ&usg=AFQjCNG5-9Jej-ukVeakTgwonqt2narbYg&bvm=bv.87269000,d.aWw'>ESCAPE</a>
@iamchrissmith
iamchrissmith / WooCommerce Coupon Count Correction
Last active Apr 15, 2020
Two functions to change the way WooCommerce counts coupon usage so Product coupons are counted each time they are applied not once per cart.
View WooCommerce Coupon Count Correction
function crc_woocommerce_display_coupons(){
global $wpdb;
$coupon_id = $wpdb->get_results(
$wpdb->prepare(
"
SELECT ID FROM $wpdb->posts
WHERE post_type = %s
AND post_status = 'publish'
",
'shop_coupon'