Skip to content

Instantly share code, notes, and snippets.

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@cmdoptesc
cmdoptesc / script-template.sh
Created November 28, 2021 21:54 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@cmdoptesc
cmdoptesc / .block
Last active February 14, 2018 22:16 — forked from mbostock/.block
Municipalities of Mexico II - How to convert a shapefile to TopoJSON by M Bostock
border: no
height: 600
license: gpl-3.0
@cmdoptesc
cmdoptesc / hn_search_with_sort.js
Last active April 12, 2016 10:44 — forked from kristopolous/hn_seach.js
HackerNews "Who is Hiring" Search w/ Date Sorting
function query() {
var SORT_RECENT_FIRST = true;
var SEARCH_REPLIES = true;
var query_list = Array.prototype.slice.call(arguments);
var commentTable = document.querySelector('.comment-tree');
var commentNodes = Array.prototype.slice.call(commentTable.querySelectorAll('.athing'));
var COMMENT_TEXT_SELECTOR = '.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88';
@cmdoptesc
cmdoptesc / README.md
Last active September 7, 2021 06:18 — forked from mbostock/.block
TopoJSON Examples

Some of these files are from the us-atlas:

  • us.json - make topo/us-10m.json
  • us-congress-113.json - make topo/us-congress-10m.json

Others are from the world-atlas:

  • world-50m.json - make topo/world-50m.json
  • world-110m.json - make topo/world-110m.json
@cmdoptesc
cmdoptesc / README.md
Last active August 29, 2015 14:25 — forked from mbostock/.block
D3 Arc Progress Gauge / Meter (for d3-js group)

D3: Async Arc Progress Gauge / Meter

View on bl.ocks.org/cmdoptesc/e9b3bfc6f43b4bd237e2

Forked from Bostock's original Progress Events example to answer Rex X's post on the d3-js group:

The progress meter is based on the number of files that have downloaded. In our case, numberOfFiles is set to 20.

We then generate 20 random durations between 0 - 3000ms to simulate download times, and call setTimeout using the durations. Each timer then calls update, which increments the number of files downloaded, increasing the progress arc with a tweening function.

<!DOCTYPE html>
<meta charset="utf-8">
<style>
.graticule {
fill: none;
stroke: #777;
stroke-opacity: .5;
stroke-width: .5px;
}