Skip to content

Instantly share code, notes, and snippets.

@kaelfeitosa
kaelfeitosa / terminal.md
Last active May 20, 2024 20:55
terminal mac atalhos

Terminal Cheatsheet (básico)

Original translation by zeluizr


COMANDOS PRINCIPAIS

Atalho Descrição
cd Diretório Home
@Miguel2617
Miguel2617 / apacheJenaSetUp.md
Last active May 20, 2024 20:54
Set up triple store based on the Apache Jena respectively Fuseki framework. The tutorial describes how to integrate a SWRL reasoner to apply arbitrary SWRL rules to the triple in the triple store.

Apache Jena: Step by step guide

Steps Presentation
1. Download the zip file of Apache Jena Fuseki on the website Apache Jena image2021-4-17_11-10-57
2. After unpacking, the server can be executed for the first time by running (double-clicking) the "fuseki-server.bat". image2021-4-17_11-14-21
3. The server offers a web interface that can be reached in the browser under localhost:3030. Here, so-called datasets, i.e. independent ontologies (e.g. for different projects) can be created or existing datasets can be edited. Files can also be uploaded. image2021-4-17_11-23-35

Information

  • SPARQL que
@gnilrets
gnilrets / trange_join.sql
Last active May 20, 2024 20:49
dbt Snapshot Join
{% macro trange_join(left_model, left_fields, left_primary_key, right_models) %}
{#
This macro allows the user to join two or more snapshot models together on a common
key, with the result being a unique record for each distinct time range. For example,
Given left_model:
| {{ join_key }} | left_field | dbt_valid_from | dbt_valid_to |
| - | - | - | - |
| k1 | L1 | 2020-01-01 | 2020-01-05 |
| k1 | L2 | 2020-01-05 | 2999-12-31 |
@wbsch
wbsch / on-modify.blocks_attr.py
Last active May 20, 2024 20:46
Taskwarrior hook script that adds a "blocks:" pseudo-attribute for adding/modifying tasks.
#!/usr/bin/env python
#
# Adds the ability to add / modify tasks using a "blocks:" attribute,
# the opposite of "depends:".
#
# This script acts as an on-modify, on-add and on-launch hook at the same time.
#
### SETUP
# Save this file as
# ~/.task/hooks/on-modify.blocks_attr.py
@yosshi4486
yosshi4486 / SynchronizingKeyValueStore.swift
Last active May 20, 2024 20:43
Example of syncing key value stores.
//
// SynchronizingKeyValueStore.swift
//
// Created by yosshi4486 on 2022/08/30.
//
import Foundation
/// A key value store that stores a key-value into both local and cloud. Subclass this class and override methods for your application.
///
@fnky
fnky / ANSI.md
Last active May 20, 2024 20:43
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
Extracted from http://makeitinireland.com/tech-map/ using js in google chrome console
$(".article").each(function(){
console.log($(this).find("h3").html() + " -- "+ $(this).find("#company_size").html() + " -- " + $(this).find("#company_address").html());
});
Company name -- Company size -- Company address
Synchronoss Software Ireland Ltd. -- Mid-sized Company -- The Academy, 42 Pearse St., Dublin 2
Fishtree -- Startup -- Fumbally Lane, Dublin
@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active May 20, 2024 20:38
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@mdiep
mdiep / diff-values.swift
Created February 4, 2020 13:02
Diff values with Mirror and AnyHashable
import Foundation
// Diff values for better test assertions.
//
// Enums and collections left as an exercise for the reader.
// A difference between two values
struct Difference: CustomStringConvertible {
let path: String
let actual: String

Dirtywave M8 Shortcuts

Extracted from the resources page at dirtywave.com.

Global Key Shortcuts

  • [DIRECTION] Move the cursor on the screen.
  • [SHIFT]+[DIRECTION] Navigate between Views
  • [EDIT] Start editing a value; also functions as a “YES” or “ENTER”