Skip to content

Instantly share code, notes, and snippets.

View Swader's full-sized avatar
🏠
Buidling

Bruno Škvorc Swader

🏠
Buidling
View GitHub Profile
===== BEGIN SOLIDSTAMP VERIFICATION =====
s54c2fn3djxn8sspki5u8ri0zlnzmi9v
===== END SOLIDSTAMP VERIFICATION =====
===== BEGIN SOLIDSTAMP VERIFICATION =====
tg7qoqhgqsdlciwsvvi9e2xwjvre2sra
===== END SOLIDSTAMP VERIFICATION =====
@Swader
Swader / tutexample.md
Created May 14, 2018 15:30
tutexample

Sometimes you need to log into a site to get to some walled-off data. Let's see an example.

Let's assume we want to crawl the articles on TheBrowser.com. TheBrowser is a manually curated subscription based website which recommends popular links around the web.

TheBrowser.com

Getting the Login Cookie

Once you have an account on the site you're wanting to crawl (TheBrowser's will cost you some $35 yearly but same procedure applies to any website with a paywall / log in area), log into it.

@Swader
Swader / Addresses
Created April 27, 2018 09:18
Addresses
foo
[
{
"constant": false,
"inputs": [],
"name": "draw",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},

In November, I realized some Core BTC devs don't understand the LN. Other influencers agreed with me, some in private, some publicly. These questions arose from that confusion, in an attempt to clear things up once and for all.


  1. If Alice and Bob want to transact, they need to open a channel, and they need to agree on max amount to transfer through that channel. This requires a transaction. To finalize the transaction so they can spend the BTC outside of their channel, they need to close it so their on-chain balance updates and so they can send BTC onward into other channels. Closing also needs a tx. How, then, is it sensible for Alice and Bob to transact this way, instead of what they can do now - use one single transaction?

  2. A common argument against the above is "you'll have middlemen through which many channels will go and form a mesh". My question is twofold:

  • a) how is it that this does not scare you? If LN becomes super popular and
enode://4aac361a34fc5a9ba5ee2cc88af2e65d8e571cc942e359147b2a70e501c196eeab3853f32c077a4336e9889724785341cca58edf7de07f54c9036abdfcf08fb2@192.168.207.235:30303
@Swader
Swader / foo
Created November 16, 2017 21:24
Verifying my Blockstack ID is secured with the address 1HwnJXKnVpHnKaCcH2jegMzjkMHg2kr89S https://explorer.blockstack.org/address/1HwnJXKnVpHnKaCcH2jegMzjkMHg2kr89S
@Swader
Swader / ebay.xml
Created July 13, 2017 07:54
Example ebay payment notification payload
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<GetItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2008-02-13T03:47:28.106Z</Timestamp>
<Ack>Success</Ack>
<CorrelationID>137541140</CorrelationID>
@Swader
Swader / colors.php
Created October 29, 2016 21:19
Array of named colors in PHP
// Array of named colors
$namedColors = [
"#000000" => "Black",
"#000080" => "Navy Blue",
"#0000C8" => "Dark Blue",
"#0000FF" => "Blue",
"#000741" => "Stratos",
"#001B1C" => "Swamp",