Skip to content

Instantly share code, notes, and snippets.

View zeddee's full-sized avatar

Zed zeddee

View GitHub Profile
@zeddee
zeddee / get-parent-element-width-and-assign.js
Last active January 20, 2019 08:29
For responsive inner elements. Quick JS to get width of containing element and use it to proportionally size the contained element.
// For responsive inner elements.
// Quick JS to get width of containing element and use it to proportionally size the contained element.
let ad = document.getElementById("hktb_ad0119") // grab element
// gets the width of the first positioned (i.e. has "position" attribute set) containing/parent element
let desiredWidth = ad.offsetParent.offsetWidth
ad.setAttribute("width", desiredWidth)
ad.setAttribute("height", ad.getAttribute("width")) // Set height = width
@zeddee
zeddee / a_load_ecdsakey_from_keystore.go
Last active January 20, 2019 09:54
Load private key from keystore file using go-ethereum library
package main
import (
"crypto/ecdsa"
"fmt"
"io/ioutil"
"log"
"os"
"github.com/ethereum/go-ethereum/accounts/keystore"
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf200
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 Larry McEnerney, Director of Chicago's Writing program\
\
Rule-based writing is for repeatable, lower-value writing.\
*
!*.adoc
!*.sh
!.gitignore

Great resources for learning HTML

  • Don’t Fear the Internet: http://dontfeartheinternet.com/

    • Great beginner’s resource, written from a beginner’s point of view. Jessica Hisch is a great person to follow in general.

  • Scrimba: https://scrimba.com/

    • Interesting learning platform — courses are videos that you can type inside of.

    • Has courses for all levels.

  • Smashing Magazine: https://www.smashingmagazine.com/articles/

    • Design oriented, and written in conversational style. May need a bit of searching to get to the articles you want.

    • Great for all levels, beginner to advanced.

Distributed writing (WIP)

Table of Contents

1. Introduction

  • Writing is a result of a tension between lone creative work and collaborative work.

  • Lone creative work is necessary because writing involves being able to form (and re-form continually) and manage a clear mental

Security Articles August 2019

GIJN Digital Security

Good resource. Many cheatsheets at the bottom of article.

Source: Global Investigative Journalism Network, "Digital Security". Available: https://gijn.org/digital-security/

Digital security basics.