Skip to content

Instantly share code, notes, and snippets.

Verifying my Blockstack ID is secured with the address 1EM69aan9S7rxK3HcFUsXKEym73peM713y https://explorer.blockstack.org/address/1EM69aan9S7rxK3HcFUsXKEym73peM713y

Futures & Streams


"I find that sometimes real-world analogies work well for explaining / remembering concepts. Here's one - it's not perfect but it helps me." "Think that you are at one of those modern sushi restaurants where you have a belt going around the room with sushi boats on it. You just sit down and wait till one goes by, grab it and eat. But they also allow you to order carry out." — Nitya Narasimhan, 2018/06/17

Future

"A Future represents a computation that doesn’t complete immediately. Where a normal function returns the result, an asynchronous function returns a Future, which will eventually contain the result. The future will tell you when the result is ready." — Dart documentation

chmod

The syntax for permissions is:

chmod UGO FILE

'UGO' representing User, Group, and Other respectively.

The following codes add up to create the permissions.

#!/usr/bin/env sh
echo "Updating local cache"
sudo apt update
echo "Done updating local cache"
echo "Updating all packages"
sudo apt-get -y dist-upgrade
echo "Done updating all packages"
@mpfaff
mpfaff / main.dart
Created May 31, 2019 20:55
Idiom: Iterate over Map keys and values
void main() {
var mymap = {'a':'b', 'c':1};
mymap.forEach((k, v) => print('Key=$k, Value=$v'));
}
@mpfaff
mpfaff / simple-icons.json
Created June 8, 2019 00:15
Simple Icons
{
".NET": {
"title": ".NET",
"hex": "5C2D91",
"source": "https://docs.microsoft.com/en-us/dotnet/images/hub/net.svg",
"svg": "<svg role=\\"img\\" viewBox=\\"0 0 24 24\\" xmlns=\\"http://www.w3.org/2000/svg\\"><title>.NET icon</title><path d=\\"M3.1672 7.5655v8.749H4.19v-6.325a8.979 8.979 0 0 0-.0488-1.1998h.0384a2.9082 2.9082 0 0 0 .2784.5473l4.4973 6.9774h1.2569V7.5655H9.1904v6.1526a9.2574 9.2574 0 0 0 .0619 1.286h-.0234c-.0544-.1056-.173-.3002-.3553-.585L4.4964 7.5656zm9.315 0v8.749h4.65l.0048-.9599h-3.6087v-3.0331h3.1579V11.4h-3.1579V8.4916h3.3884v-.926zm5.4374 0v.926h2.5149v7.823h1.0216v-7.823H24v-.926zM.6534 15.067a.643.643 0 0 0-.4565.2062A.6719.6719 0 0 0 0 15.753a.6623.6623 0 0 0 .1968.4799.6479.6479 0 0 0 .4799.2015.6623.6623 0 0 0 .4799-.2015.6575.6575 0 0 0 .2015-.48.667.667 0 0 0-.2015-.4798.6575.6575 0 0 0-.4799-.2062.643.643 0 0 0-.0234 0z\\"/></svg>"
},
"500px": {
"title": "500px",
"hex": "0099E5",
@mpfaff
mpfaff / gist:6f4dee01005876bba3591da16b9c5153
Last active August 23, 2019 15:10
BlockStack Proof of Ownership
Verifying my Blockstack ID is secured with the address 178mYep1d2mFAJxdJEC5b1hAQU64oA559A https://explorer.blockstack.org/address/178mYep1d2mFAJxdJEC5b1hAQU64oA559A
@mpfaff
mpfaff / keybase.md
Last active September 25, 2019 11:30
Keybase Proof of Ownership

Keybase proof

I hereby claim:

  • I am mpfaff on github.
  • I am nucleusdev (https://keybase.io/nucleusdev) on keybase.
  • I have a public key ASB8ZXUXNJ8CRin6g8Q2w2Tis7r-XKLkfVylx4P0FQOagwo

To claim this, I am signing this object:

@mpfaff
mpfaff / main.dart
Created September 27, 2019 17:50
Dart Concatenate Lists Example
void main() {
var a = [1,2,3];
var b = [3,2,4];
var ab = a + b;
print(ab);
}

Keybase proof

I hereby claim:

  • I am mpfaff on github.
  • I am mpfaff (https://keybase.io/mpfaff) on keybase.
  • I have a public key ASAQGYKY7QtsoOI9LE9ZoZvg9iyK6Xg2-7MZ4myg-E2BrQo

To claim this, I am signing this object: