Skip to content

Instantly share code, notes, and snippets.

Vas Kaloidis vaskaloidis

Block or report user

Report or block vaskaloidis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ccc4a3ce6b5bd1e7489ad295d171e694
#!/usr/bin/env ruby
# proofj.rb - tests the proof:
# If m is any even integer, then (−1)𝑚+3 = −1.
# Config
verbose = true
super_verbose = false
# Iteration Boundaries
start_number = -10
View hash_arbuments.rb
# Hash Method Arguments
def foo(b: 2, c: 3, **args)
puts b #=> 2
puts args #=> {a: 1, d: 4}
end
# Usage: foo(a: 1, b: 2, c: 3, d: 4)
# Explination:
@vaskaloidis
vaskaloidis / rails-app-generator-example.rb
Created May 27, 2018 — forked from andrewle/clever-rails.rb
A Rails app generator tuned my common needs
View rails-app-generator-example.rb
#!/usr/bin/env ruby
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
require "active_support/core_ext/string/strip"
class CleverAppGenerator < Rails::Generators::AppGenerator
class_option :skip_bundle, default: true
class_option :database, default: "postgresql"
class_option :skip_test_unit, default: true, hide: true
View genesis_public_key
0431308ee286a3fe630c7a1e1f30e849565b405afaccd747df5638b8f75ca2a598a312b3aa7de2d31698f875a7955d8852ea32d7ed6b140868402856515418166e;mythic-forge-test
@vaskaloidis
vaskaloidis / 0_reuse_code.js
Created Jan 22, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View traefik.toml
# rules.toml
[web]
address = ":8081"
[docker]
domain = "mysite.io"
watch = true
swarmmode = true
@vaskaloidis
vaskaloidis / schema.rb
Created Jan 10, 2017
My Schema.rb file
View schema.rb
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
View gist:add9c707bab153fc5f2c18948f8ef432
Started GET "/apps?name=this-does-not-exist" for ::1 at 2016-12-18 13:23:18 -0500
Processing by AppsController#index as JSON
Parameters: {"name"=>"this-does-not-exist"}
App Load (0.6ms) SELECT "apps".* FROM "apps"
{:json=>#<ActiveRecord::Relation [#<App id: 1, name: "App-Name 0", api_key: nil, api_secret: nil, created_at: "2016-12-18 16:14:40", updated_at: "2016-12-18 16:14:40", builder_lock: false, auth_token: nil>, #<App id: 2, name: "App-Name 1", api_key: nil, api_secret: nil, created_at: "2016-12-18 16:14:40", updated_at: "2016-12-18 16:14:40", builder_lock: false, auth_token: nil>, #<App id: 3, name: "App-Name 2", api_key: nil, api_secret: nil, created_at: "2016-12-18 16:14:40", updated_at: "2016-12-18 16:14:40", builder_lock: false, auth_token: nil>, #<App id: 4, name: "App-Name 3", api_key: nil, api_secret: nil, created_at: "2016-12-18 16:14:40", updated_at: "2016-12-18 16:14:40", builder_lock: false, auth_token: nil>, #<App id: 5, name: "App-Name 4", api_key: nil, api_secret: nil, created_at: "20
View error.log
tidbits master % rails generate npm_pipeline:brunch
identical package.json
identical brunch-config.js
append app/assets/stylesheets/application.css
/Users/vasilioskaloidis/Code/Rails/tidbits/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `binread': No such file or directory @ rb_sysopen - /Users/vasilioskaloidis/Code/Rails/tidbits/app/assets/stylesheets/application.css (Errno::ENOENT)
from /Users/vasilioskaloidis/Code/Rails/tidbits/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `replace!'
from /Users/vasilioskaloidis/Code/Rails/tidbits/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:59:in `invoke!'
from /Users/vasilioskaloidis/Code/Rails/tidbits/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /Users/vasilioskaloidis/Code/Rails/tidbits/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:in `insert_into_file'
from /Users/vasilioskaloidis/Code/Rails/tidbits/v
You can’t perform that action at this time.