Skip to content

Instantly share code, notes, and snippets.

View gullitmiranda's full-sized avatar
🌎
Working from anywhere

Gullit Miranda gullitmiranda

🌎
Working from anywhere
View GitHub Profile
@gullitmiranda
gullitmiranda / using-uuid-as-pk.md
Created November 25, 2023 16:59 — forked from rponte/using-uuid-as-pk.md
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@gullitmiranda
gullitmiranda / database.yml
Last active October 10, 2023 08:07
ruby DATABASE_URL parse
<%
require 'cgi'
require 'uri'
begin
uri = URI.parse(ENV["DATABASE_URL"])
rescue URI::InvalidURIError
raise "Invalid DATABASE_URL"
end
@gullitmiranda
gullitmiranda / README.md
Last active September 30, 2023 11:13
Remote support or pair programing cheet sheet with http://tmate.io
  1. Install http://tmate.io

  2. Configure ~/.tmux.conf

    curl -sSL -o ~/.tmux.conf https://gist.github.com/gullitmiranda/e631f14a66a8ff658eb7/raw/fc3cfb7cd2ef1cc6e5d0de66b1e93b68652de866/tmux.conf
  3. Start tmate server

@gullitmiranda
gullitmiranda / deployment.yaml
Created February 22, 2022 23:19
Elixir + k8s startup/liveness/readiness probs
spec:
template:
spec:
containers:
- name: {{ .Chart.Name }}
# ...
#
## Application health checks
# initialDelaySeconds: Number of seconds after the container has started before startup, liveness or readiness probes are initiated.
# periodSeconds: How often (in seconds) to perform the probe. Default to 10 seconds. The minimum value is 1.
#! /bin/bash
function valid_required_envs() {
# Configs
required_envs=(KUBE_CONTEXT KUBE_SERVER)
# Securities
required_envs+=(KUBE_CERTIFICATE_AUTHORITY)
required_envs+=(KUBE_CLIENT_CERTIFICATE KUBE_CLIENT_KEY)
errors=()
diff --git lib/hive/acquisitions/document_template.ex lib/hive/acquisitions/document_template.ex
index 411b0d8a..2ce227ee 100644
--- lib/hive/acquisitions/document_template.ex
+++ lib/hive/acquisitions/document_template.ex
@@ -21,7 +21,21 @@ defmodule Hive.Acquisitions.DocumentTemplate do
has_many(
:processes_templates,
- through: [:processes_templates_documents_templates, :process_template]
+ through: [:processes_templates_documents_templates, :process_template],
{
"functions": "~`(function() {\n var hueStep = 2",
"blue-1": "color(~`colorPalette(\"@{blue-6}\", 1)`)",
"blue-2": "color(~`colorPalette(\"@{blue-6}\", 2)`)",
"blue-3": "color(~`colorPalette(\"@{blue-6}\", 3)`)",
"blue-4": "color(~`colorPalette(\"@{blue-6}\", 4)`)",
"blue-5": "color(~`colorPalette(\"@{blue-6}\", 5)`)",
"blue-6": "#1890ff",
"blue-7": "color(~`colorPalette(\"@{blue-6}\", 7)`)",
"blue-8": "color(~`colorPalette(\"@{blue-6}\", 8)`)",
@gullitmiranda
gullitmiranda / Azkfile.js
Created April 5, 2016 19:41
Azkfile cakephp with rabbitmq
systems({
// coloque este Azkfile no root de cada projeto alterando apenas o nome do sistema
// ex: biobanco, apipatinf
// obs. não esqueça de também adicionar o Dockerfile no root de cada projeto
// obs2. não esquecer de alterar o nome do sistema também no setDefault no final do Azkfile
avapng: {
depends: ["mysql"],
image: { dockerfile: './Dockerfile' },
workdir: '/var/www',
shell: '/bin/bash',
diff --git i/src/components/Pages/Sections/GenericSection.tsx w/src/components/Pages/Sections/GenericSection.tsx
index 0e58d20..8a04ac7 100644
--- i/src/components/Pages/Sections/GenericSection.tsx
+++ w/src/components/Pages/Sections/GenericSection.tsx
@@ -2,17 +2,19 @@ import * as React from 'react';
import { Theme, withStyles, WithStyles, StyleRules } from 'material-ui/styles';
-import Section, { SectionColor, SectionProps } from '../../../ui/Section';
+import { MetaInfo } from '../../PrismicRender';
@gullitmiranda
gullitmiranda / Butto.tsx
Created November 17, 2017 18:33 — forked from nuxlli/Butto.jsx
Extend material Button with Typescript
import * as React from 'react';
import * as classNames from 'classnames';
import { Theme } from 'material-ui/styles';
import { withStyles, WithStyles, StandardProps } from 'material-ui';
import MButton, { ButtonProps, ButtonClassKey } from 'material-ui/Button';
export const styles = (theme: Theme) => ({
root: {
borderRadius: 4,