Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View iwan's full-sized avatar

Iwan Buetti iwan

  • Milano, Italy
View GitHub Profile
@iwan
iwan / province.geojson
Last active February 18, 2019 13:18 — forked from davidejmancino/province.geojson
Confini amministrativi delle province italiane
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iwan
iwan / elixir_phoenix_notes.md
Created April 4, 2018 12:33 — forked from hmans/elixir_phoenix_notes.md
Notes on learning Elixir and Phoenix

Notes on learning Elixir and Phoenix

Just some assorted notes I've made while digging into Phoenix, Elixir and friends. I'm coming from a strong Rails background, so many of these will refer to features from that framework.

Views / Templates

Biggest difference from Rails?

Unlike Rails, where rendering is almost always performed by a template file, the responsibility of rendering a response in Phoenix lies with a view module (that typically corresponds to the current controller module.) This view module will typically offer a whole bunch of render functions (matching different parameters, first and foremost the template name.) Templates (found in web/templates/) will directly compile into such functions.

@iwan
iwan / new.html
Created February 22, 2017 21:41 — forked from mediasota/new.html
Refactor Rails application layout to use HTML5 semantics with HAML
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset='utf-8'>
@iwan
iwan / 1.yml
Created February 17, 2017 12:40 — forked from ndelitski/1.yml
drone.yml examples
clone:
path: github.com/gogits/gogs
build:
image: golang:$$GO_VERSION
environment:
- TAGS="pam sqlite"
- BUILD_OS="windows linux darwin freebsd openbsd netbsd"
@iwan
iwan / devise.it.yml
Last active March 20, 2018 20:30 — forked from epistrephein/devise.it.yml
Italian translation for Devise 3.5
# Italian translation for Devise 4.2
# Date: 2016-08-01
# Author: epistrephein, iwan
# Note: Thanks to xpepper (https://gist.github.com/xpepper/8052632)
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
it:
devise:
confirmations:
confirmed: "Il tuo account è stato correttamente confermato."
@iwan
iwan / net_http.rb
Last active December 29, 2015 14:46 — forked from a-chernykh/net_http.rb
require 'net/http'
def download_net_http(uris, thread_count)
queue = Queue.new
uris.map { |uri| queue << uri }
threads = thread_count.times.map do
Thread.new do
while !queue.empty? && uri = queue.pop
@iwan
iwan / git.css
Last active August 29, 2015 14:11 — forked from neilgee/git.css
/* Set up Git Configuration */
git config --global user.email "you@yourdomain.com"
git config --global user.name "Your Name"
git config --global core.editor "vi"
git config --global color.ui true
@iwan
iwan / route.rb
Last active August 29, 2015 13:59 — forked from vparihar01/route.rb
# NOTE below gems are only for development purpose can be removed and commented out as per requirement
group :development do
gem 'rails-erd','1.0.0'
gem 'hirb','0.7.0'
gem 'railroady'
gem 'itslog','0.6.1'
gem 'quiet_assets'
gem 'sextant' # now included in Rails 4.0
end
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2