Skip to content

Instantly share code, notes, and snippets.

@josephspurrier
josephspurrier / values_pointers.go
Last active July 15, 2024 16:04
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@ggregoire
ggregoire / README.md
Created October 13, 2016 20:35
React: stopPropagation VS nativeEvent.stopImmediatePropagation

TL;DR

If you mix JS event listeners and React event listeners, you need

event.nativeEvent.stopImmediatePropagation()

Scenario

@haskaalo
haskaalo / tarcheatsheet.md
Last active July 12, 2024 06:35
Tar usage / Tar Cheat Sheet

Tar Usage / Cheat Sheet

Compress a file or directory

e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

  • -c: Create an archive.
  • -z: Compress the archive with gzip.
  • -v: makes tar talk a lot. Verbose output shows you all the files being archived and much.
  • -f: Allows you to specify the filename of the archive.
@danazkari
danazkari / Smart Contracts with React (how to be the coolest kid on the block).md
Last active June 6, 2023 20:49
Smart Contracts with React (how to be the coolest kid on the block).md

Smart Contracts with React (how to be the coolest kid on the block)

Recommended snack and song:

220ml of dark roasted full bodied coffee brewed in french press accompanied by a banana while listening to [Liquid Tension Experiment]

tl;dr: You can go ahead and clone [this repo], it's got the end result of this in-depth tutorial bellow.

Here's what we will be doing for becoming smart-contract heroes! - Install the dev environment plus MetaMask. - Develop a very simple voting smart contract.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.demo.daemon.plist</string>
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
@GiambiHuang
GiambiHuang / CustomContext.js
Last active October 30, 2019 05:16
State Management with React hooks and mock react-promise-middleware
import React, { useReducer, useCallback, useContext } from 'react';
const initialState = {
data: '',
isPending: false,
};
export const constant = {
FETCH_DATA: 'FETCH_DATA',
FETCH_DATA__PENDING: 'FETCH_DATA__PENDING',