Skip to content

Instantly share code, notes, and snippets.

@rlafranchi
rlafranchi / destroy_all_heroku_apps.sh
Created November 10, 2022 16:46
Closing a heroku account requires all apps be destroyed first, here is a simple shell script to destroy all of your heroku apps using the heroku cli.
#!/bin/bash
heroku apps | while read app ; do
heroku apps:destroy $app --confirm $app
done
@rlafranchi
rlafranchi / nimiq-node-digital-ocean.md
Last active November 13, 2023 13:43
Setting up a Nimiq Node on DigitalOcean

Running a Nimiq Node on a Digital Ocean droplet

I thought I would put this quick tutorial together to help out anyone interested in contributing a node to the Nimiq network, also feel free to sign up using my referral link which will give you a $10 credit - https://m.do.co/c/0e575aa2cb44

requires some basic shell skills

First steps

  • Create a droplet and pick an operating system (we'll Use Ubuntu as an example)
  • Select a droplet size (If you are mining expect to get around 1 to 1.5kh/s per cpu core for a standard droplet)
  • Once the droplet is created, be sure to configure your desired domain name's dns settings to point to the assigned ip address for the droplet. In this example we'll be using nimiq.example.com
@rlafranchi
rlafranchi / watchRobot.cron.php
Created July 29, 2016 04:50 — forked from eyecatchup/watchRobot.cron.php
Mr. Robot Season 2 easter egg website email alert cronjob
<?php
ini_set('max_execution_time', 300);
/**
* Mr. Robot Season 2 easter egg website email alert cronjob
* (Note: requires your PHP to be able to send emails (of course)!)
*
* 1. Download this script. Browser download: https://gist.github.com/eyecatchup/f5f5929f57b22fc1b37ef516d675ac92/download/
* Or, for the console users:
* # wget --no-check-certificate https://gist.github.com/eyecatchup/f5f5929f57b22fc1b37ef516d675ac92/raw/watchRobot.cron.php
*
class Matrix
attr_reader :rows, :columns
def initialize(str)
@rows = str.split("\n").map { |row| row.split(" ").map(&:to_i) }
@columns = @rows.transpose
end
def saddle_points
arr = []