I hereby claim:
- I am pietromoro on github.
- I am pietromoro (https://keybase.io/pietromoro) on keybase.
- I have a public key whose fingerprint is 4E9D F2C8 074A 306B 936E C394 AF50 1491 457B 0B4C
To claim this, I am signing this object:
| @echo off | |
| setlocal EnableDelayedExpansion | |
| REM TODO: Make this better this one, detect vcvarsall for 2019/2022 versions and run accordingly | |
| if not defined DevEnvDir ( | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" | |
| ) | |
| set BUILD_DIR=build | |
| set SOURCE_DIR=src |
| #!/bin/bash | |
| # Tempfile that contains the last ip set | |
| tempfile=currentip.tmp | |
| touch $tempfile | |
| last_ip=`cat $tempfile` | |
| echo "Last IP: $last_ip" | |
| curl -X GET "https://v4.ident.me" > $tempfile | |
| current_ip=`cat $tempfile` |
I hereby claim:
To claim this, I am signing this object:
| # Be sure to restart your server when you modify this file. | |
| # Restyle how errors are shown | |
| ActionView::Base.field_error_proc = proc do |html_tag, instance| | |
| html = %(<div class="field-with-errors">#{html_tag}</div>).html_safe | |
| form_fields = %w[textarea input select] | |
| elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css 'label, ' + form_fields.join(', ') | |
| elements.each do |element| | |
| next if element.attributes.include? "data-disable-error-styling" |
| module Sluggable | |
| extend ActiveSupport::Concern | |
| cattr_reader :slugging | |
| included do | |
| before_save :generate_slug | |
| def self.sluggable | |
| all.extending(Sluggable::Finder) | |
| end |
| module Kernel | |
| def enum(values) | |
| Module.new do |mod| | |
| values.each_with_index{ |v,i| mod.const_set(v.to_s.capitalize, 2**i) } | |
| def mod.inspect | |
| "#{self.name} {#{self.constants.join(', ')}}" | |
| end | |
| end | |
| end |
| module BeforeRender | |
| extend ActiveSupport::Concern | |
| included do | |
| alias_method :render_without_before_render_action, :render | |
| alias_method :render, :render_with_before_render_action | |
| define_callbacks :render | |
| end | |
| def render_with_before_render_action(*options, &block) |