Skip to content

Instantly share code, notes, and snippets.

View LinkSake's full-sized avatar
🌊
I sure hope I know what I'm doing

Luis Ángel Ortega LinkSake

🌊
I sure hope I know what I'm doing
View GitHub Profile
@LinkSake
LinkSake / script.rb
Created February 15, 2022 18:24
Localizable.strings to Localizable.swift Ruby Script
file = IO.read(ARGV[0])
keys = file.gsub(/=+\s("+.+")+;/, '')
values = file.gsub(/("+.+")+\s+=+\s/, '')
keys_arr = keys.split('"').select { |f| /[a-zA-Z]/.match(f) }
values_arr = values.split('"').select { |f| /[a-zA-Z]/.match(f) }
File.open(ARGV[1], 'w') do | f |
keys_arr.each_with_index do |key, index|
@LinkSake
LinkSake / _paginator.haml
Created August 25, 2021 17:54
Semantic UI HAML Paginator
- if total == 1
%div
- else
.ui.compact.menu
- if total <= 4
- for i in 0...total
= link_to i + 1, url_for(request.parameters.merge({:page => i + 1})), class: 'item'
- else
- if page == 1
= link_to '<', url_for(request.parameters.merge({:page => page - 1})), class: 'item disabled'
@LinkSake
LinkSake / README.md
Created August 27, 2020 21:29
Readme / Github presentation

Hello there! I'm Luis Angel ✌️