Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
⌨️

Alexander ADAM alexanderadam

⌨️
⌨️
View GitHub Profile
View swisslotto_1970-01-10_1979-03-31.csv
Draw Numbers Complementary #
1979-03-31 [2, 8, 17, 19, 21, 40] 1
1979-03-24 [3, 0, 5, 16, 35, 36] 37
1979-03-17 [0, 5, 6, 12, 19, 29] 39
1979-03-10 [12, 18, 2, 0, 25, 35] 38
1979-03-03 [3, 4, 11, 21, 27, 32] 37
1979-02-24 [5, 6, 14, 24, 34, 36] 26
1979-02-17 [5, 9, 17, 18, 20, 28] 29
1979-02-10 [6, 11, 18, 27, 32, 40] 13
1979-02-03 [6, 13, 23, 32, 36, 39] 9
View docker-on-android.md

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@alexanderadam
alexanderadam / macOS_launcher.sh
Created Aug 14, 2020 — forked from StefanoBelli/macOS_launcher.sh
Fast OS X launch on QEMU with KVM support enabled. Credits to: https://github.com/kholia, original repository: https://github.com/kholia/OSX-KVM
View macOS_launcher.sh
#!/bin/sh
# qemu-img create -f qcow2 mac_hdd.img 64G
# echo 1 > /sys/module/kvm/parameters/ignore_msrs
#
# Type the following after boot,
# -v "KernelBooter_kexts"="Yes" "CsrActiveConfig"="103"
#
# printf 'DE:AD:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256))
#
@alexanderadam
alexanderadam / debug.md.html
Last active Jul 8, 2020
Properly debug Jekyll variables
View debug.md.html
---
layout: page
title: debug
permalink: /debug
---
<div id="jekyll-debug"></div>
<script>
var debugDiv = document.getElementById('jekyll-debug');
@alexanderadam
alexanderadam / unsubscribe_from_github_issue_notifications.rb
Last active Dec 24, 2020
Script to unsubscribe from all issue notifications on GitHub
View unsubscribe_from_github_issue_notifications.rb
#!/usr/bin/env ruby
# set env variables GITHUB_USER and GITHUB_PASS
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'ferrum'
end
@alexanderadam
alexanderadam / Dockerfile
Created Mar 11, 2020 — forked from blacksheep--/Dockerfile
Traefik Catch-All to return HTTP421 for unresolved routes
View Dockerfile
FROM golang:1.14-alpine
COPY . /go/src/app
WORKDIR /go/src/app
RUN go get -v -d
RUN go install
CMD ["app"]
View before_all_and_after_all_in_minitst.rb
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'
@alexanderadam
alexanderadam / Ansible Disk Check
Created Sep 15, 2018 — forked from mahemoff/Ansible Disk Check
Show disk space and warn about disk full in Ansible
View Ansible Disk Check
* 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
@alexanderadam
alexanderadam / optimization.rake
Created Jul 17, 2018 — forked from merqlove/optimization.rake
PostgreSQL optimization tasks for ActiveRecord
View optimization.rake
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}")
View EasterHegg Smart Contract Workshop.md

EasterHegg 18 Workshop: Smart Contracts on Ethereum

Requirements:

Coding your first smart contract!

a. Setting up Metamask