Skip to content

Instantly share code, notes, and snippets.

@smycek
smycek / api.coingecko.prices.md
Last active September 22, 2021 03:28
Using the CLI to fetch CoinGecko prices via API

Fetch prices using CLI and print json to stdout

One liner to fetch the simple price of any token listed on CoinGecko via their open API.
You need the utilities curl and jq. Type the command below into your terminal:

curl -s -X 'GET' 'https://api.coingecko.com/api/v3/simple/price?ids=dragon-egg%2Cstorm-token%2Cwrapped-avax%2Cstellar%2Cmonero%2Cbitcoin%2Cethereum&vs_currencies=usd%2Ceur&include_market_cap=false&include_24hr_vol=false&include_24hr_change=false&include_last_updated_at=false' -H 'accept: application/json' | jq . --sort-keys && date
# Canon DR-F120
SYSFS{idVendor}=="1083", SYSFS{idProduct}=="1654", MODE="664", OWNER="lp", GROUP="scanner"
@smycek
smycek / 🔎 Available SANE packages
Created September 15, 2021 11:37
Search for Available SANE packages on debian/apt based linux distributions
sudo apt update && apt search sane | grep -e '^sane' -e 'libsane'
location / {
rewrite ^(.*?)\.html(\.html)?$ $1 permanent;
try_files $uri $uri.html $uri.html.html $uri/ =404;
}
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Framework\App\Action\Action;
// @codingStandardsIgnoreFile
?>