An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
NOTE
You may not need local branches for all pull requests in a repo.
To fetch only the branch that you need, use Fetch and delete refs to GitHub pull request branches
If you do for some reason need all pull request branches locally, continue on.
With the scarecity of IPv4 addresses, and IPv6 still not available at large, NAT traversal is becoming a necessity. Especially with the generalisation of Carrier-grade NATs that you can find on mobile connections. Even with IPv6 you may suffer NAT66. Imagine your mobile device that gets only a single Ipv6 address, and you want to share it on your computer.
The solution might be in a decentralized protocol for address attribution such
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'JSON' | |
require 'digest/sha2' | |
require 'pry' | |
require 'bigdecimal' | |
require 'bitcoin' # Because I need to cheat every now and then | |
# Usage: | |
# gem install pry json ffi ruby-bitcoin |
/* | |
In Ethereum, a contract can be written so that it returns a value for eth_call. | |
A Dapp can then check for success or error value of eth_call, before calling eth_sendTransaction, | |
to take advantage of eth_call effectively being a "preview" of the code flow that the transaction | |
will take. In traditional client-server, clients can't ask servers beforehand what's going to | |
happen when the client makes a call; with Dapps contracts can be written so that clients can ask | |
for a "preview" of what is going to happen, before any funds/ethers are actually utilized | |
(eth_call does not cost any ethers). | |
Note: it is possible that in between eth_call and when eth_sendTransaction is actually mined, |
pragma solidity ^0.4.13; | |
contract someContract { | |
mapping(address => uint) balances; | |
function deposit() payable { | |
balances[msg.sender] += msg.value; | |
} | |
// JS calling Rust | |
var addon = require('../native'); | |
console.log(addon.hello()); | |
// -> "hello node" | |
console.log(addon.adder(1,2)); | |
// -> 3 | |
console.log(addon.objAdder({a: 2, b: 5})); |
rundown of different scripts and what is what and what goes where.
prevoutScript
is the script of the output being spendredeemScript
is the script that is used to solve the P2SHsignatureScript
is the script that is taken into the signatureHash
for signingwitnessRedeemScript
is the script that is used to solve the P2WSHscriptSig
is what goes into the input.scriptSig
when serializing the TXwitnessScript
is what goes into the input.witness
when serializing the TXimport React, {PropTypes} from 'react'; | |
import classNames from 'classnames'; | |
class BatchDropZone extends React.Component { | |
static propTypes = { | |
// function that recieves an array of files | |
receiveFiles: PropTypes.func.isRequired, |