Skip to content

Instantly share code, notes, and snippets.

@joshj
joshj / server.js
Created February 28, 2012 16:58 — forked from jeffrafter/server.js
Twitter OAuth with node-oauth for node.js+express
/*
Node.js, express, oauth example using Twitters API
Install Node.js:
curl -0 http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz
tar -zxf node-v0.6.11.tar.gz
cd node-v0.6.11
./configure
make
make install
@JadenGeller
JadenGeller / Swift Atomic Operators.swift
Created March 17, 2015 01:38
Swift Atomic Operators
import Foundation
infix operator +=! { associativity right precedence 90 } // Int32 or Int64
infix operator -=! { associativity right precedence 90 } // Int32 or Int64
postfix operator ++! {} // Int32 or Int64
postfix operator --! {} // Int32 or Int64
infix operator |=! { associativity right precedence 90 } // UInt32
infix operator &=! { associativity right precedence 90 } // UInt32
@filipnavara
filipnavara / WorkloadManifest.json
Last active November 6, 2023 17:02
Update workload to CI build
{
"microsoft.net.sdk.ios": "15.2.301-preview.13.5",
"microsoft.net.sdk.macos": "12.1.301-preview.13.5"
}
@dsemenovsky
dsemenovsky / getConfirmations.js
Created June 1, 2018 23:58
Get Ethereum transaction confirmations count
async function getConfirmations(txHash) {
try {
// Instantiate web3 with HttpProvider
const web3 = new Web3('https://rinkeby.infura.io/')
// Get transaction details
const trx = await web3.eth.getTransaction(txHash)
// Get current block number
const currentBlock = await web3.eth.getBlockNumber()
/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would