Skip to content

Instantly share code, notes, and snippets.

View jaimeiniesta's full-sized avatar

Jaime Iniesta jaimeiniesta

View GitHub Profile
@jaimeiniesta
jaimeiniesta / settings.jsonc
Created May 12, 2020 10:36 — forked from thbar/settings.jsonc
Current minimalistic VSCode setup (à la atom/textmate)
// My settings for VS Code - inspired by https://gist.github.com/thbar/cfeb158fb6fc52a0fed1df3c84048ffc
{
"window.zoomLevel": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "JakeBecker.elixir-ls",
"terminal.integrated.shell.osx": "/bin/bash",
// path at top of editor is very noisy
"breadcrumbs.enabled": false,
@jaimeiniesta
jaimeiniesta / settings.jsonc
Created May 12, 2020 10:36 — forked from thbar/settings.jsonc
Current minimalistic VSCode setup (à la atom/textmate)
{
// NOTE: these settings work well for me
// using Ruby, Elixir and Assembly languages.
//
// I would probably do something different if
// I worked more with other languages at the moment
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"workbench.startupEditor": "newUntitledFile",
@jaimeiniesta
jaimeiniesta / phx-1.4-upgrade.md
Last active November 19, 2018 17:32 — forked from chrismccord/phx-1.4-upgrade.md
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals received an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

// fixes closing on click on https://gist.github.com/ctalkington/4093995
// and hides all modals before opening a new one so they don't pile up
// leanModal v1.1 by Ray Stone - http://finelysliced.com.au
// Dual licensed under the MIT and GPL
(function($){
$.fn.extend({
leanModal: function(options) {
var defaults = {
top: 100,
# This prevents capistrano from hanging when executing long tasks
# /etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 15
ClientAliveCountMax 5
# Restart sshd
# This allows to use a numeric or a lambda
def retry_upto(max_retries = 1, options = {})
begin
return yield if ((max_retries -= 1) > 0)
rescue (options[:rescue_only] || Exception)
if options[:patience]
if options[:patience].is_a?(Numeric)
options[:wait] = options[:wait] * options[:patience]
else
!.*/(\.[^/]*|public\/images|doc\/app|vendor\/rails|cache|tmp|log|logs|system|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
#Selector de idioma
#dependencias:
# 1 - Rack locale del paquete Rack-contrib [1]
# USO: Se usa para detectar el idioma definido por el usuario en su browser ['HTTP_ACCEPT_LANGUAGE']
# Esplicado aquí http://guides.rubyonrails.org/i18n.html#using-accept-language
# [1] http://github.com/rack/rack-contrib
# 2 - Routing-filter [1]
# USO: Establecer el locale en las URLs ej.: www.mysite.com/es/foo/bar
# NOTA: Si tambien quieres traducir las URL's usa la gema de Raul Murciano Translate_routes [2] (De momento sin cobertura para Rails3)