Skip to content

Instantly share code, notes, and snippets.

  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@sambacha
sambacha / cla-diff.txt
Last active September 5, 2020 08:35 — forked from atoulme/cla.txt
ConsenSys Apache 2 based CLA
ConsenSys Software Inc
Individual Contributor License Agreement ("Agreement") V2.0
http://www.apache.org/licenses/
Thank you for your interest in ConsenSys Software Inc (ConsenSys). In order to clarify the intellectual property license granted with Contributions from any person or entity, ConsenSys must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of ConsenSys and its users; it does not change your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to ConsenSys. In return, ConsenSys shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its nonprofit status and bylaws in effect at the time of the Contribution. Except for the license gra
@sambacha
sambacha / cla.txt
Created September 5, 2020 08:45 — forked from rojotek/cla.txt
ConsenSys Apache 2 based CLA
ConsenSys Software Inc
Individual Contributor License Agreement ("Agreement") V2.0
http://www.apache.org/licenses/
Thank you for your interest in ConsenSys Software Inc (ConsenSys).
In order to clarify the intellectual property license
granted with Contributions from any person or entity, ConsenSys
must have a Contributor License Agreement ("CLA") on file that has
been signed by each Contributor, indicating agreement to the license
terms below. This license is for your protection as a Contributor as
@sambacha
sambacha / gist:31f3e6ef2bdeff4795cd3e5f229a3c15
Created September 6, 2020 21:46 — forked from nolash/gist:62e6c872ec126594359d20cbe26cd3aa
solidity contract disassembly interpretation

contract

pragma solidity ^0.4.11;

contract Simple {
	bytes32 public v;
	function set(bytes32 _v) {
		v = _v;
	}
package main
import (
"bytes"
"crypto/ecdsa"
"flag"
"fmt"
"io"
"math/rand"
"net"
@sambacha
sambacha / layering.md
Created September 7, 2020 23:36 — forked from tazjin/layering.md

This program reads an export reference graph (i.e. a graph representing the runtime dependencies of a set of derivations) created by Nix and groups them in a way that is likely to match the grouping for other derivation sets with overlapping dependencies.

This is used to determine which derivations to include in which layers of a container image.

Inputs

@sambacha
sambacha / layering.md
Created September 7, 2020 23:37 — forked from tazjin/layering.md

This program reads an export reference graph (i.e. a graph representing the runtime dependencies of a set of derivations) created by Nix and groups them in a way that is likely to match the grouping for other derivation sets with overlapping dependencies.

This is used to determine which derivations to include in which layers of a container image.

Inputs

@sambacha
sambacha / sketch.dhall
Created September 15, 2020 14:51 — forked from mikesol/sketch.dhall
Yet another Dhall-API-protocol proposal
let fold = https://prelude.dhall-lang.org/List/fold
let filter = https://prelude.dhall-lang.org/List/filter
let equal = https://prelude.dhall-lang.org/Natural/equal
let Obj = <User | Pet | List>
let Key = <Id | Type | Name | Pets | Head | Tail>
let Entry = <Int_: Integer | Bool_: Bool | Double_: Double | Text_: Text | Id_: Natural | Type_: Obj | Nil>
let Row = { ptr: Natural, key: Key, val: Entry }
let Db = List Row