I'm a 23 year old interested in software development, computer science, IoT and photography. Most of all I love creating software that people love to use and which makes their lives easier. I'm also a regular speaker at Zag.rb.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example 1 | |
module Logger | |
extend self | |
attr_accessor :output, :log_actions | |
def log(&event) | |
self.log_actions ||= [] | |
self.log_actions << event | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec/autorun' | |
module Memoizer | |
def memoize(method_name) | |
method = instance_method(method_name) | |
define_method(method_name) do |*args| | |
variables = instance_variables.each_with_object({}) do |name, hash| | |
hash[name] = instance_variable_get(name) unless name == :@memoization | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove stopped images | |
echo "Removing unused containers..." | |
if [[ -z $(docker ps -a -q) ]] | |
then | |
echo "No unused containers found." | |
else | |
docker rm $(docker ps -a -q) | |
fi | |
# Remove dangling volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configuration | |
DEVICE=/dev/ttyACM0 | |
BAUD=9600 | |
SEND="" | |
FOLLOW=0 | |
RECEIVE=0 | |
HELP=0 |
I hereby claim:
- I am stankec on github.
- I am monorkin (https://keybase.io/monorkin) on keybase.
- I have a public key ASDDUMYqWMcsxPpKftv97h-jN911JPqFYX-8MZmToeu3dgo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# USAGE: | |
# curl https://gist.github.com/stankec/.../iterm_theme_to_alacritty.rb > iterm_theme_to_alacritty.rb | |
# chmod +x iterm_theme_to_alacritty.rb | |
# ./iterm_theme_to_alacritty.rb path/to/your/theme.itermcolors | |
# | |
# This will output the config to the terminal | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT licenses.license AS license, COUNT(licenses.repo_name) AS count | |
FROM [bigquery-public-data:github_repos.licenses] AS licenses | |
JOIN [bigquery-public-data:github_repos.languages] AS languages ON licenses.repo_name = languages.repo_name | |
WHERE languages.language.name = '<language name>' | |
GROUP BY license |
I hereby claim:
- I am monorkin on github.
- I am monorkin (https://keybase.io/monorkin) on keybase.
- I have a public key ASDDUMYqWMcsxPpKftv97h-jN911JPqFYX-8MZmToeu3dgo
To claim this, I am signing this object:
OlderNewer