Skip to content

Instantly share code, notes, and snippets.

View radamanthus's full-sized avatar

Radamanthus Batnag radamanthus

View GitHub Profile
@radamanthus
radamanthus / create_env.rb
Last active August 8, 2017 06:45
Engine Yard CoreAPI script to create an environment
#!/usr/bin/env ruby
# Very basic example of how to create a given environment
require 'ey-core'
require 'optparse'
require 'yaml'
APP_SERVER_COUNT = "1"
INSTANCE_SIZE = "m3_medium"
@radamanthus
radamanthus / boot_env.rb
Created August 8, 2017 06:46
Engine Yard CoreAPI script to boot an environment
#!/usr/bin/env ruby
# Very basic example of how to boot a given environment from a blueprint
# For more info visit http://developer.engineyard.com
require 'ey-core'
require 'optparse'
require 'yaml'
options = {}
{
"alert_email": "email address where you want automated warnings to go",
"backup_interval": "int value for db backups, configurable on dashboard",
"backup_window": "int value for db backups, configurable on dashboard",
"ruby_version": "Ruby 1.9.3 - could be 2.0.0 or something else",
"db_host": "internal hostname of your database master",
"db_slaves": [
"db replica hosts appear here. only works with [Postgre|My]SQL"
],
"user_ssh_key": [
@radamanthus
radamanthus / ubuntu-workstation.md
Last active May 8, 2018 05:16
Ubuntu workstation setup

Ubuntu workstation setup

Firefox add-ons

  • lastpass
  • uBlock origin

System packages

sudo apt install curl
@radamanthus
radamanthus / geckonsole.rb
Created September 26, 2018 15:32
Geckonsole
require 'ripl'
def help
puts %{
Available commands:
help
hello
}
end
@radamanthus
radamanthus / Hamurabi.txt
Last active July 2, 2019 15:26
Hamurabi runtime notes
Original Basic source code: https://programmingpraxis.com/2010/07/27/hamurabi-bas/2/
Runtime output of https://github.com/blt/hamurabi
Try your hand at governing Ancient Sumeria
successfully for a 10 year term of office.
Hamurabi: I beg to report to you,
in year 0, 0 people starved 5 came to the city.
@radamanthus
radamanthus / READ LATER
Created September 30, 2019 03:22
Read Later
Generative Engineering Culture
https://changelog.com/posts/how-to-build-a-generative-engineering-culture
@radamanthus
radamanthus / tsne.py
Created April 20, 2024 08:33
Exploring tSNE
import pandas
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
from ucimlrepo import fetch_ucirepo
breast_cancer_wisconsin_diagnostic = fetch_ucirepo(id=17)
X = breast_cancer_wisconsin_diagnostic.data.features
y = breast_cancer_wisconsin_diagnostic.data.targets