Skip to content

Instantly share code, notes, and snippets.

View onlurking's full-sized avatar
:shipit:
ship it

Diogo Felix onlurking

:shipit:
ship it
View GitHub Profile
@mtucker
mtucker / creating_a_date_dimension_table_in_postgresql.sql
Last active December 14, 2022 14:04 — forked from duffn/creating_a_date_dimension_table_in_postgresql.sql
Creating a date dimension table in PostgreSQL
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,
@jkrems
jkrems / es-module-history.md
Last active November 5, 2023 19:35
History of ES modules

Modules - History & Future

History

@danielgracia
danielgracia / coalesce.ex
Last active December 7, 2017 17:13
Coalesce macro
defmodule Coalesce do
@moduledoc """
Provides a "coalesce" macro.
This macro is partly inspired by the COALESCE function in the SQL-92 standard.
The original COALESCE function is a function that returns the first non-null
computed expression passed as one of its argument, or NULL itself if no such
expression is found.
@jpswade
jpswade / devops_best_practices.md
Last active May 3, 2024 11:49
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing

@kerryboyko
kerryboyko / README.md
Last active April 26, 2023 16:08
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

{
"name": "evil_chat",
"private": true,
"dependencies": {
"@rails/webpacker": "^3.2.0",
"coffeescript": "1.12.7",
"normalize.css": "^7.0.0"
},
"scripts": {
"lint-staged": "$(yarn bin)/lint-staged"
#!/usr/bin/env bash
set -e
main() {
previous_file="$1"
file_to_edit=`select_file $previous_file`
if [ -n "$file_to_edit" ] ; then
"$EDITOR" "$file_to_edit"
main "$file_to_edit"
@VictorTaelin
VictorTaelin / promises.md
Last active April 23, 2022 15:18
promises de novo

(edit: clique aqui para um fork desse texto melhor editado, feito pelo Kewerson Hugo; não vou mexer no original pq deu resultado, e eu gostaria de observar se isso pode ser parcialmente atribuido ao seu estilo)

o pq de funcões assíncronas

funcoes de javascript quase sempre são assincronas. isso acontece porque js lida muito com coisas como http requests, leitura de disco... operacoes que levam muito tempo. imagina se seu programa travasse toda vez que vc fizesse um request http? pra evitar isso, o request é feito em background, o programa continua rodando, e depois o resultado é enviado pra vc num callback

request("www.google.com", function callback(resultado) { ... })
@fmasanori
fmasanori / super salários USP.py
Created July 4, 2017 23:27
Super Salários USP
"""
Autores:
Tiago Henrique da Cruz Pereira
João Felipe de Moraes Borges
"""
import threading
import time
import os
from urllib.request import urlopen
@Luiz-Monad
Luiz-Monad / CS
Last active May 9, 2020 12:03
CS
https://teachyourselfcs.com/
http://steshaw.org/plt/
https://github.com/open-source-society/computer-science
PLT: advanced
textbooks
http://cs.brown.edu/~sk/Publications/Books/ProgLangs/
http://www.cis.upenn.edu/~bcpierce/tapl/main.html
http://highered.mheducation.com/sites/0070131511/index.html