Skip to content

Instantly share code, notes, and snippets.

View 0xd61's full-sized avatar
🚀
Focusing

Daniel Glinka 0xd61

🚀
Focusing
View GitHub Profile
@0xd61
0xd61 / ruc_calc.js
Created November 11, 2019 19:42 — forked from mewelling/ruc_calc.js
Paraguay Cédula + RUC calculation
/*
To calculate the RUC number for your cedula:
Starting with the rightmost digit, multiply it by 2.
Then, multiply the next digit by 3 and add it to the first result.
Then, multiply the next digit by 4 and add it to the running total.
... keep doing this.
Finally, take the remainder of the the total divided by 11 (called the modulo),
and subtract it from 11.
original inspiration: http://www.necesitomas.com/digito-verificador
<header>
<h1><span>Is there a way to keep the irregular coloured background in such a way that each line of text doesn't obscure the previous line?</span></h1>
</header>
<style>
header {
width: 100%;
max-width: 36em;
margin: 0 auto;
padding: 5em 0;
@0xd61
0xd61 / XBPS
Created September 25, 2019 20:36
Bash Oneliners
# List all installed packages with size
xbps-query -m | while read PKG; do xbps-query $PKG | awk '$1 ~ /pkgver|installed_size/ {printf "%s ", $2}'; printf "\n"; done
@0xd61
0xd61 / ecto_postgres_fulltext_search_querying_example.ex
Created May 8, 2019 13:45 — forked from pmarreck/ecto_postgres_fulltext_search_querying_example.ex
How to set up postgres fulltext search triggers, index, and tsvector column on Elixir/Phoenix, with Ecto querying, including ranking and sorting by rank
defmodule YourAppName.Search do
# ...
@doc """
Queries listings.
"""
def query_listings(query, current_user) do
default_scope = from l in Listing, where: l.draft == false or l.user_id == ^current_user.id, order_by: [desc: l.updated_at], limit: 50
id = _try_integer(query)
@0xd61
0xd61 / osx-10-10-virtualbox.md
Last active December 31, 2017 13:51 — forked from frdmn/osx-10-10-virtualbox.md
Install OS X 10.10 Yosemite in VirtualBox

Fehler oder Fehlendes bitte in den Kommentaren anmerken! :)

General Cloud

  • immer und überall verfügbar
  • unendlich skalierbar
  • keine Down-Time
  • kostet weniger - pay-per-use
  • keine maintain Kosten für physische Rechner
  • Kunden müssen keine Updates installieren (Updates können direkt deployed werden)
  • Einfach mit anderen Services verbinden (APIs)

Keybase proof

I hereby claim:

  • I am kaitsh on github.
  • I am kaitsh (https://keybase.io/kaitsh) on keybase.
  • I have a public key whose fingerprint is 616D 700D DB44 C5BA 5D26 CA81 4D87 83B0 E4CA 67E8

To claim this, I am signing this object: