Skip to content

Instantly share code, notes, and snippets.

View ph4un00b's full-sized avatar
:shipit:
0.5 * (1 + srqt(5))

carbon based lifeform ph4un00b

:shipit:
0.5 * (1 + srqt(5))
  • l33t l4mer
  • Latam
  • 10:18 (UTC -06:00)
View GitHub Profile
<select id='country-selection'
ng-options="option.name for option in vm.countries track by option.code"
ng-model="vm.selectedCountries"
material-select
multiple
name="country_selection" required>
<option disabled value="">Select visitor country (max 3)</option>
</select>
:set foldmethod=indent
:set foldlevelstart=20
:set enc=utf-8
:set relativenumber
:set number
:set autoindent
:set expandtab
:set smarttab
:set softtabstop=2
@ph4un00b
ph4un00b / psql.txt
Created December 5, 2018 18:04
postgresql
\? -> help
create database JAMON; -> create DB | alternative: $ createdb JAMOM
\l -> list db's
drop database JAMON; -> drop DB
\q -> exits
\c JAMON -> switch over DB
\d TABLE? -> describe DB or TABLE
create table NAME(\n column TYPE, ...); -> start modeling table
SERIAL, TEXT -> column types
insert into TABLE(column) values('value'); -> fill the table
@ph4un00b
ph4un00b / commands.txt
Last active April 8, 2024 20:40
terminal hacks docker / unix / windows
|============================= PODMAN / DOCKER =======================|
@see https://unix.stackexchange.com/questions/198590/what-is-a-bind-mount
* ls ~ .docker/
* cat $env:USERPROFILE/.docker/config.json
* docker search nvidia
* docker *image* build -t IMAGE_NAME . *--no-cache*
* docker container run --rm -d [-p 8080:8080 ⭕ --publish mode=ingress,published=8080,target=8080] example/hello-node:latest ✨ in the background
* ✅ docker ps
@ph4un00b
ph4un00b / phau lang
Last active February 10, 2024 00:42
lang
for queues:
- queue#pop(0)
- queue#pop(-1) // kind of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at
type testing
alias_function@
boolean_function?
named_function(a: 1, b: 3) or named_function({a:1, b: 3})
fn name { return und } or fnr name { und }
@ph4un00b
ph4un00b / refactorings.rs
Last active September 28, 2023 20:34
rustic refactorings
// https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4c469132823a44a3e014f18c54a0f0a9
for (row_idx, row) in world.floor.clone().iter().enumerate() {
for (col_idx, _value) in row.iter().enumerate() {
if world.floor[row_idx][col_idx] == 0_u8 {
world.floor[row_idx][col_idx] = 7_u8;
}
}
}
{
description = "monterrelleno-mba17 nix-darwin system flake";
inputs = {
# este ghostty es uno exclusivo para mocos monterrey, un crack el tipito
# TODO: apreder lo minimo de objetive-c para usar el libghostty y sentirme sexy
# @see: https://ghostty.org/docs/about#libghostty
ghostty = {
url = "github:fightingdreamer/ghostty/v1.1.2-macos-12";
};