Skip to content

Instantly share code, notes, and snippets.

View akullpp's full-sized avatar

aku akullpp

View GitHub Profile
@akullpp
akullpp / command.txt
Last active May 23, 2022 09:42
Install a different arch (e.g. darwin_amd64) with asdf if you have a M1 macbook (e.g. darwin_arm64)
arch -x86_64 asdf install <plugin> <version>
@mencargo
mencargo / postgresql.md
Last active April 19, 2024 07:22
PostgreSQL Queries

Useful PostgreSQL Queries & Commands

All sizes in MB, change /1024/1024 to /1024/1024/1024 for GB.

Databases sizes

Without system databases

select
datname as database,
(pg_database_size(datname)/1024/1024) as size
@thomasdarimont
thomasdarimont / KeycloakAdminClientExample.java
Last active April 23, 2024 09:02
Using Keycloak Admin Client to create user with roles (Realm and Client level)
package demo.plain;
import org.keycloak.OAuth2Constants;
import org.keycloak.admin.client.CreatedResponseUtil;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.admin.client.resource.RealmResource;
import org.keycloak.admin.client.resource.UserResource;
import org.keycloak.admin.client.resource.UsersResource;
import org.keycloak.representations.idm.ClientRepresentation;
@Avaq
Avaq / combinators.js
Last active March 18, 2024 20:49
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@mikesigs
mikesigs / angular-directive-priority.md
Last active November 17, 2022 12:49 — forked from awerlang/angular-directives
Angular Directive Priority - Quick Reference

##Angular Directive Priority - Quick Reference

When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The priority is used to sort the directives before their compile functions get called. Priority is defined as a number. Directives with greater numerical priority are compiled first. Pre-link functions are also run in priority order, but post-link functions are run in reverse order. The order of directives with the same priority is undefined. The default priority is 0.

For a brief description of each directive, click here.

Directive | Priority | Terminal | Creates new scope | Can be used as multiElement ---------- | :---------: | :---------: | :---------------

@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google