Skip to content

Instantly share code, notes, and snippets.

View sohjiro's full-sized avatar

Felipe Juárez sohjiro

View GitHub Profile
@sohjiro
sohjiro / maven-archetype.list
Created June 22, 2020 21:16
Maven archetypes list (mvn archetype:generate) at June 22th, 2020
Choose archetype:
1: remote -> am.ik.archetype:elm-spring-boot-blank-archetype (Blank multi project for Spring Boot + Elm)
2: remote -> am.ik.archetype:graalvm-blank-archetype (Blank project for GraalVM)
3: remote -> am.ik.archetype:graalvm-springmvc-blank-archetype (Blank project for GraalVM + Spring MVC)
4: remote -> am.ik.archetype:graalvm-springwebflux-blank-archetype (Blank project for GraalVM + Spring MVC)
5: remote -> am.ik.archetype:maven-reactjs-blank-archetype (Blank Project for React.js)
6: remote -> am.ik.archetype:msgpack-rpc-jersey-blank-archetype (Blank Project for Spring Boot + Jersey)
7: remote -> am.ik.archetype:mvc-1.0-blank-archetype (MVC 1.0 Blank Project)
8: remote -> am.ik.archetype:spring-boot-blank-archetype (Blank Project for Spring Boot)
9: remote -> am.ik.archetype:spring-boot-docker-blank-archetype (Docker Blank Project for Spring Boot)
/* This file is for your main application css. *//* Includes Bootstrap as well as some default style for the starter
* application. This can be safely deleted to start fresh.
*/
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relat
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Hello Todo!</title>
use Mix.Config
config :todo, Todo.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: {:system, "HOST"}, port: {:system, "PORT"}],
cache_static_manifest: "priv/static/manifest.json"
config :logger, level: :info
config :phoenix, :serve_endpoints, true
@sohjiro
sohjiro / mix.exs
Created July 16, 2017 03:45
Dependencies for an elixir project
defp deps do
[{:phoenix, "~> 1.2.4"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
{:distillery, "~> 1.4", runtime: false}
]
@sohjiro
sohjiro / .spacemacs
Last active January 7, 2017 05:56
spacemacs config
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@sohjiro
sohjiro / spacemacs-cmd-sheet
Last active January 7, 2017 05:56
Alchemist cmd sheet
<SPC> m h h Looking for documentation
<SPC> m g g Going to definition of a function
<SPC> m , Going Back
<SPC> m m c Compile whole project
C-c a x Prompt for a mix command including a list of all available mix commands. alchemist-mix
C-c a m c Compile the whole elixir project. alchemist-mix-compile
C-c a m r Runs the given file or expression in the context of the application. alchemist-mix-run
C-c a p s Toggle between a file and its tests in the current window. alchemist-project-toggle-file-and-tests
@sohjiro
sohjiro / zurg_escape.ex
Created February 27, 2016 21:25
Zurg escape solution elixir... 1st approach
defmodule ZurgEscape do
def right_combinations({left_toys, right_toys, time_spending, steps}) do
for {p1, t1} <- left_toys, {p2, t2} <- left_toys, p1 != p2, do: {left_toys, [{p1, t1}, {p2, t2}], right_toys, time_spending, steps}
end
def right_combinations(data, result \\ [])
def right_combinations([], result), do: result
def right_combinations([{left, _combinations, right, time, steps} | t], result) do
right_combinations(t, right_combinations({left, right, time, steps}) ++ result)
end
@sohjiro
sohjiro / tmux.conf
Last active December 13, 2015 21:09
tmux.conf
set -g prefix C-a ### Cambiando prefijos
set -sg escape-time 1 ### Cambiando el delay de los commandos
set -g base-index 1 ### Cambiando la numeracion de las ventanas
setw -g pane-base-index 1 ### Cambiando la numeracion de los paneles
bind C-a send-prefix ### Compartiendo el prefijo con otras aplicaciones
bind r source-file ~/.tmux.conf \; display "Reloaded!" ### Asignando comando para la recarga del archivo de configuracion
bind | split-window -h ### Asignando comando para dividir el panel de manera vertical
bind - split-window -v ### Asignando comando para dividir el panel de manera horizontal
@sohjiro
sohjiro / Groovy Duck Typing Problem
Created December 13, 2012 16:41
Un pequeño acercamiento de un problema que tuvimos
"101".collect{ s -> Long.valueOf(s) }.sort()
["101","102"].collect{ s -> Long.valueOf(s) }.sort()