Skip to content

Instantly share code, notes, and snippets.

View 0xd61's full-sized avatar
🚀
Focusing

Daniel Glinka 0xd61

🚀
Focusing
View GitHub Profile

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:

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)
@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
@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 / 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
<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 / 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
@0xd61
0xd61 / xcb_fullscreen_toggle.cpp
Last active November 17, 2023 22:05
Linux XCB Fullscreen Toggle Snippet
//
// This section is just for context
//
#include <xcb/xcb.h>
#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
typedef int8_t int8;
@0xd61
0xd61 / kvm-manager-wifi.sh
Last active September 10, 2020 19:18
kvm/qemu helper script
#!/bin/bash
# script from http://www.linux-kvm.org/page/Simple_shell_script_to_manage_your_virtual_machine_with_bridged_networking
######################
## Default settings ##
######################
## Directory and files
if ! [ -d $2 ]
@0xd61
0xd61 / gibbon_markbook_query.sql
Last active September 18, 2020 15:07
MySQL queries and procedures for gibbon
-- Procedure to export grades for a year and class from the markbook
DROP PROCEDURE IF EXISTS customMarkbookGrades;
DELIMITER $$
CREATE PROCEDURE customMarkbookGrades (
IN school_year_id int(3),
IN year_group VARCHAR(256),
IN class_name VARCHAR(256),
IN grade_type VARCHAR(256)