Skip to content

Instantly share code, notes, and snippets.


Guayo Mena guayom

  • Kemcom Costa Rica
  • Costa Rica
View GitHub Profile
guayom / in-operator.ts
Last active Jun 6, 2020
Typescript patterns
View in-operator.ts
// Use the Javascript "in" operator for automatic type inference
interface Admin {
id: string;
role: string;
interface User {
email: string;
guayom / index.html
Last active Apr 5, 2020
Test ways to group arrays
guayom / import.rb
Created Sep 5, 2017
Hugo import from yml database with ruby
View import.rb
require 'yaml'
require 'parameterize'
require 'open-uri'
require 'fileutils'
idustries = YAML.load_file('import/v5n_novatec_idustries.yml')
idustries.each_with_index do |idustry, index|
unless idustry['state'] == -2
FileUtils::mkdir_p "content/idustries/#{idustry['titulo'].parameterize}"