Skip to content

Instantly share code, notes, and snippets.

View dmitryrck's full-sized avatar

Dmitry L Rocha dmitryrck

View GitHub Profile
@rafaelrpbelo
rafaelrpbelo / nginx.conf
Last active January 26, 2020 04:38
Default vhost config from Dokku
server {
listen [::]:80;
listen 80;
server_name jevel.com.br;
access_log /var/log/nginx/jevel-flats-access.log;
error_log /var/log/nginx/jevel-flats-error.log;
location / {
gzip on;
@marcosinger
marcosinger / completions-gswitch.fish
Created October 16, 2019 19:40
Fish helpers to handle with gcloud config
# ~/.config/completions/gswitch.fish
#
# creates a variable with the name of gcloud named configurations. Ex.:
#
# ~ glist
# NAME IS_ACTIVE ACCOUNT PROJECT
# aluminium False contact@aluminium.com aluminium-123
# nickel True contact@nickel.com nickel-001
# zinc False hi@zinc.io zinc-project
#
@olbat
olbat / icu_info.cr
Last active May 5, 2017 00:53
A Crystal program that returns information about the ICU install
require "xml"
require "c/dlfcn"
PKGNAME = "icu-uc"
TESTFUNC = "u_init"
{% if flag?(:darwin) %}
SOFILE = "libicuuc.dylib"
{% elsif flag?(:windows) %}
SOFILE = "libicuuc.dll"
{% else %}
@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@akitaonrails
akitaonrails / BACKEND.md
Last active April 3, 2024 19:49
Codeminer 42 - BACKEND Test

TRZ (The Resident Zombie) - Backend

Problem Description

The world, as we know it, has fallen into an apocalyptic scenario. The "Influenzer T-Virus" (a.k.a. Twiter Virus) is transforming human beings into stupid beasts (a.k.a. Zombies), hungry to cancel humans and eat their limbs.

You, the last survivor who knows how to code, will help the resistance by deploying a system to connect the remaining humans. This system will be essential to detect new infections and share resources between the members.

Requirements

@mauricioklein
mauricioklein / zssn.md
Last active April 16, 2024 14:12
Zombie Survival Social Network

ZSSN (Zombie Survival Social Network)

Descrição do Problema

O mundo finalmente atingiu o seu estado apocalíptico, onde uma pandemia causada por um virus de laboratório transforma seres humanos e animais em zumbis, seres sedentos por carne.

Você, como membro da resistência (e último sobrevivente com conhecimentos em desenvolvimento de software) foi incubido à desenvolver um sistema para compartilhamento de recursos entre os humanos não infectados.

Funcionalidades

@pneff
pneff / Back Template
Created February 14, 2014 08:33
Anki Card Type for multiple-choice
<div class="check-container"><span id="check"></span></div>
{{#Question}}
<p>{{Question}}</p>
{{/Question}}
{{#Image}}
<p class="image">{{Image}}</p>
{{/Image}}
files = Dir.glob("app/**/*.rb")
files.concat Dir.glob("lib/**/*.rb")
files.each do |file_name|
lines = File.readlines(file_name)
if !["#encoding: utf-8\n", "# encoding: utf-8\n"].include?(lines.first)
puts "Rewriting #{file_name}"
lines = ["#encoding: utf-8\n"].concat lines
new_file = File.new(file_name, "w")
lines.each { |line| new_file.write line }
@fellix
fellix / repeating_decimal.rb
Last active December 18, 2015 12:19
turning a repeating decimal into fraction
class Numeric
def £(other_number)
RepeatingDecimal.new(self, other_number)
end
end
class RepeatingDecimal
attr_reader :repeating
def initialize(base, repeating)