Skip to content

Instantly share code, notes, and snippets.

View xantiagoma's full-sized avatar

Santiago Montoya A. xantiagoma

View GitHub Profile
// db/schema/auth.ts
import {
int,
timestamp,
mysqlTable,
primaryKey,
varchar,
text
} from "drizzle-orm/mysql-core"
import type { AdapterAccount } from "@auth/core/adapters"
@pablokbs
pablokbs / docker-raspberry.md
Last active April 21, 2024 04:31
Docker en raspberry
@daliborgogic
daliborgogic / nginx-geoip-module.md
Created June 12, 2018 13:44 — forked from VirtuBox/nginx-geoip-module.md
How to configure GeoIP module for Nginx

Create a folder to store the databases :

mkdir -p /usr/share/GeoIP

Download Country IP database

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
@nnja
nnja / config-editor.md
Created October 5, 2017 05:00
Configure git editor

Set which editor git should use.

This is the program that will open during a commit with no -m flag, a merge, a rebase, etc...

Select from any installed editor. Examples:

  • emacs: emacs
  • vi: vi or vim
// This gist explains how to setup scalable Parse LiveQuery server on Heroku
// Because there is one and only 'web' process on Heroku, it will divide into two Heroku apps: Main and LiveQuery.
// A: Main app - All features except for LiveQuery server
// Step A1. Setup a Parse app on Heroku
// Step A2. Add a Heroku Redis (free plan is enough for testing)
// Step A3. Configure Parse app, add redisURL for liveQuery
var api = new ParseServer({
...
liveQuery: {
@subfuzion
subfuzion / dep.md
Last active June 14, 2023 15:46
Concise guide to golang/dep

Overview

This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.

I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.

At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:

@juanarbol
juanarbol / chmodCheatSheet.md
Last active April 10, 2024 19:17
Chmod cheat sheet

Chmod codes cheat sheet

How to use chmod codes in UNIX:

  1. There are three types of permissions in files and folders in unix
    1. Read (r)
    2. Write (w)
    3. Execute (x)
  2. And, there is a classification of users called UGO (explained bellow):
  3. U ~> User (usually, you)
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@bennadel
bennadel / app.component.ts
Created June 20, 2017 11:39
Using % (Percent) For In-Line Styles In Angular 4.2.3
// Import the core angular services.
import { Component } from "@angular/core";
@Component({
selector: "my-app",
styleUrls: [ "./app.component.css" ],
template:
`
<p class="actions">
<strong>Values:</strong>
#!/bin/bash
hostname=$(hostname -s)
cd ~/Library/Application\ Support/com.bohemiancoding.sketch3/
rm .license && touch .license && echo '{"meta":{"generated_at":"'$(date)'","sign":"==","device_name":"'$hostname "("$(id -un)')"},"payload":{"status":"ok","application":"sketch3","type":"license","udid":"c2d8c1dd037f919d57124de1037eeb22efad6bd1","expiration":"9999999999"}}' >> .license
echo '127.0.0.1 backend.bohemiancoding.com' | sudo tee -a /etc/hosts