Skip to content

Instantly share code, notes, and snippets.

@chrisallick
chrisallick / blockchain.rb
Created July 18, 2017 14:31
tiny blockchain in ruby
#https://medium.com/crypto-currently/lets-build-the-tiniest-blockchain-e70965a248b
#http://ruby-for-beginners.rubymonstas.org/writing_classes/self.html
#https://stackoverflow.com/questions/33768598/ruby-sha-256-hexidigest-values-are-different-from-what-python-generates
#import hashlib as hasher
require "rubygems"
require "digest"
# class Block:
# def __init__(self, index, timestamp, data, previous_hash):
@gokulkrishh
gokulkrishh / media-query.css
Last active February 27, 2025 11:14
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@stober
stober / softmax.py
Created March 1, 2012 03:05
Softmax in Python
#! /usr/bin/env python
"""
Author: Jeremy M. Stober
Program: SOFTMAX.PY
Date: Wednesday, February 29 2012
Description: Simple softmax function.
"""
import numpy as np
npa = np.array