- Chrome/ium or Firefox
- Metamask
a. Setting up Metamask
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
| #!/bin/bash | |
| # get latest docker compose released tag | |
| COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) | |
| # Install docker-compose | |
| sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" | |
| chmod +x /usr/local/bin/docker-compose | |
| sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose" |
| // Sometimes it's necessary to do a bit of clean-up | |
| Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) { | |
| el.removeAttribute('data-confirm'); | |
| el.click(); | |
| }); |
| #!/bin/sh | |
| # put this file in /etc/network/if-up.d/ | |
| if iwconfig wlp4s0 | grep -c "ESSID:\"WIFIonICE\"" | |
| then | |
| curl -s "https://www.ombord.info/hotspot/hotspot.cgi?connect=&method=login&realm=db_advanced_wifi" | |
| fi |
a. Setting up Metamask
| namespace :optimization do | |
| desc "Provide DB vacuum for production environment" | |
| task :vacuum => :environment do | |
| begin | |
| tables = ActiveRecord::Base.connection.tables | |
| tables.each do |table| | |
| ActiveRecord::Base.connection.execute("VACUUM FULL ANALYZE #{table};") | |
| end | |
| rescue Exception => exc | |
| Rails.logger.error("Database VACUUM error: #{exc.message}") |
| * Shows a message while asserting like: | |
| ok: [host] => { | |
| "msg": "disk usage 4.2B of total 20.0GB (21.0%) (should exceed limit 90.0%)" | |
| } | |
| * Note this only looks at first mount point on current node | |
| * Fails if disk is near-full | |
| * Last step pushes to a push-based monitoring service, which will alert us if it doesn't get there after some time | |
| * Need to setup a variable `disk_limit`, which is the max acceptable usage ratio, e.g. set it to 0.8 if you want to keep disks within 80% of max size |
| def alert(color=:default, message) | |
| colors = {default: 0, black: 30, red: 31, green: 32, orange: 33, blue: 34, magenta: 35, teal: 36, white: 37} | |
| $stdout.puts "----\e[#{colors[color]}m#{message}\e[0m----" | |
| end | |
| alert :red, 'before all tests' | |
| at_exit { alert :red, 'after all tests' } | |
| require 'minitest/autorun' |
| FROM golang:1.14-alpine | |
| COPY . /go/src/app | |
| WORKDIR /go/src/app | |
| RUN go get -v -d | |
| RUN go install | |
| CMD ["app"] |
| #!/usr/bin/env ruby | |
| # set env variables GITHUB_USER and GITHUB_PASS | |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'ferrum' | |
| end |