Skip to content

Instantly share code, notes, and snippets.

View philss's full-sized avatar

Philip Sampaio philss

View GitHub Profile
@fernandobarbalho
fernandobarbalho / discursos_deputados.r
Last active May 17, 2023 19:45
Script para pegar os discursos dos deputados que atuaram em uma dada legislatura
library(jsonlite)
library(purrr)
legislatura<-"56"
#Endereço básico para capturar todos os deputados de uma legislatura
path<- "https://dadosabertos.camara.leg.br/api/v2/deputados?idLegislatura=%s&ordem=ASC&ordenarPor=nome"
path<- sprintf(path, legislatura)

Animating Outputs with Kino.animate

The Grid

This is an experimentation notebook to try out Kino.animate/3

See livebook-dev/kino#49

@dnovais
dnovais / fix-error-fatal-role-postgres-does-not-exist.md
Created March 30, 2020 14:26
Fixing error - psql: FATAL: role “postgres” does not exist

Corrigindo o erro psql: FATAL: role “postgres” does not exist

1 - Instalar o postgresql

brew install postgresql

2 - Startar o postgresql

@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 14, 2024 20:05
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@27Bslash6
27Bslash6 / gcrgc.sh
Last active September 6, 2020 07:55 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@ahmetb
ahmetb / gcrgc.sh
Last active February 26, 2024 09:14
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

FROM nabeken/docker-volume-container-rsync
RUN mkdir -p /var/www
ENV VOLUME /var/www
VOLUME /var/www
@shiroyasha
shiroyasha / dog.rb
Created February 16, 2016 22:20
Method tracer for Ruby classes
class Dog
attr_writer :name
def initialize(name)
@name = name
end
def bark
puts "patrick"
end
@chrismccord
chrismccord / gist:ee5ae90b949a9768b871
Last active February 17, 2022 19:34
Phoenix 0.16.x to 0.17.0 upgrade instructions

Deps

Bump your :phoenix and :phoenix_live_reload deps in mix.exs:

def deps do
  [...
   {:phoenix, "~> 0.17"},
   {:phoenix_live_reload, "~> 1.0"},
  ...]