Skip to content

Instantly share code, notes, and snippets.

View juanhuttemann's full-sized avatar

Juan Hüttemann juanhuttemann

  • Asunción, Paraguay
View GitHub Profile
@juanhuttemann
juanhuttemann / main.go
Created September 13, 2019 02:11
Datos de Asegurado de IPS
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"strings"
"time"
@juanhuttemann
juanhuttemann / Guardfile
Last active February 28, 2019 22:42
Live Reload configuration for Rails
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
watch(%r{(app|vendor)(/assets/\w+/(.+\.css)).*}) do |m|
"/assets/application.css"
end
watch(%r{(app|vendor)(/assets/\w+/(.+\.(js|html|png|jpg))).*}) do |m|
"/assets/#{m[3]}"
package main
import (
"encoding/json"
"fmt"
"net"
"net/http"
"time"
"github.com/shirou/gopsutil/cpu"
@juanhuttemann
juanhuttemann / l4.go
Created December 18, 2018 17:05
Compresor/Descompresor L4
package main
import (
"bufio"
"io"
"os"
"github.com/pierrec/lz4"
)
@juanhuttemann
juanhuttemann / install.sh
Created November 16, 2018 00:09
rails 5.2.1 installer
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev -y
cd
wget http://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz
tar -xzvf ruby-2.5.3.tar.gz
cd ruby-2.5.3/
./configure
make
sudo make install
ruby -v
gem install bundler
@juanhuttemann
juanhuttemann / 42-things.md
Created October 9, 2018 10:52 — forked from xdite/42-things.md
Ten (42) Things You Didn't Know Rails Could Do
@juanhuttemann
juanhuttemann / Gemfile
Last active September 26, 2018 00:18
Configuración básica para Rails 5
#...
gem 'bootstrap-sass', '~> 3.3.7'
gem 'devise', '~> 4.4'
gem 'jquery-rails'
gem 'niceql'
gem 'pry-rails', group: :development
gem 'rails-i18n'
gem 'ransack'
gem 'simple_form'
gem 'sweet-alert-confirm'
@juanhuttemann
juanhuttemann / app.json
Created September 18, 2018 01:29
Dokku Predeploy
{
"name": "ruby-rails-sample",
"description": "A sample Ruby on Rails application",
"scripts": {
"dokku": {
"predeploy": "bundle exec rails db:create db:migrate RAILS_ENV=production"
}
}
}
npm --add-python-to-path='true' --debug install --global windows-build-tools
First add user to www-data group then...
sudo chown -R USER:www-data /var/www/owncloud/data/USER/files