Skip to content

Instantly share code, notes, and snippets.

View gregth's full-sized avatar

Grigoris Thanasoulas gregth

  • Friday Energy B.V.
  • Amsterdam, Netherlands
View GitHub Profile
@Aritzherrero4
Aritzherrero4 / FreebudsPro.md
Last active August 8, 2025 08:14
Huawei Freebuds Pro - Linux (KDE Neon) configuration and AAC audio

Huawei Freebuds Pro - Linux (KDE Neon) configuration and AAC audio

The default configuration of KDE Neon does not work with the headphones. I have managed to connect them doing some changes, and adjusting some configurations. This resumes that, to keep it if I need to reconfigure them in the future.

This configuration has worked for me using the following setup:

  • KDE Neon 5.20, kernel 5.4.0
  • Freebuds Pro version 1.9.0.256
@darkdreamingdan
darkdreamingdan / .tmux.conf
Created November 11, 2018 01:18
My tmux configuration. Enables colours, uses backtick as a prefix (double backtick to write an actual backtick). Ctrl+d and Ctrl+e for split panes (a la hyper.js)
#enable colours
set -g default-terminal "xterm-256color"
#add ` as prefix
set-option -g prefix2 `
# double tap ` to get a real `
bind ` send-keys `
# split panes using | and -
@tjvr
tjvr / crypttab
Last active March 13, 2024 17:06
Hibernate on Ubuntu 18.04 with LVM full-disk encryption
sda5_crypt UUID=c66880c1-c2f1-40fc-9580-f25d493876ef none luks,discard
@MattiJarvinen-BA
MattiJarvinen-BA / agnoster.zsh-theme
Last active April 23, 2021 06:44
Got tired of too long ZSH directory names with oh-my-zsh agnoster theme. To be placed in .oh-my-zsh/custom/themes/agnoster.zsh-theme
source $ZSH/themes/agnoster.zsh-theme
# Dir: current working directory
# %1 for one dir
# %2 for 2 you get it eventually
prompt_dir() {
prompt_segment blue black '%1~'
}
PROMPT='%{%f%b%k%}$(build_prompt) '
@olih
olih / jq-cheetsheet.md
Last active October 19, 2025 15:40
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@dvliman
dvliman / gist:267b66ac3a321172fd35
Created January 4, 2015 03:32
linux-kernel-booting-process

GNU/Linux kernel internals

Linux kernel booting process. Part 1.

If you read my previous blog posts, you can note that sometime ago I have started to get involved low-level programming. I wrote some posts about x86_64 assembly programming for Linux. In the same time I started to dive into GNU/Linux kernel source code. It is very interesting for me to understand how low-level things works, how programs runs on my computer, how they located in memory, how kernel manages processes and memory, how network stack works on low-level and many many other things. I decided to write yet another series of posts about GNU/Linux kernel for x86_64.

Note, that I'm not professional kernel hacker and I don't write code for kernel at work, just a hobby. I just like low-level stuff and it is interesting to me how these

@nicholsn
nicholsn / virtuoso_odbc.py
Last active August 26, 2019 05:52
Connect to virtuoso using pyodbc
import pyodbc
connection = pyodbc.connect('DRIVER=/usr/local/lib/virtodbc.so;HOST=192.168.59.103:1111;UID=dba;PWD=dba')
cursor = connection.cursor()
# the iri piece looks up the datatype, in this case none
res = cursor.execute("SPARQL SELECT ?o (iri(sql:RDF_DATATYPE_OF_OBJ(?o, 'untyped!'))) WHERE {?s ?p ?o .}")
res.next()
@jikkujose
jikkujose / .tmux.conf
Created November 17, 2013 04:37
Change prefix key in tmux to back-tick and still type back-ticks
unbind C-b
set-option -g prefix `
bind ` send-prefix
@danfinlay
danfinlay / How to download streaming video.md
Last active August 14, 2025 12:20
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@rancas
rancas / RDFLib+python+Virtuoso
Created May 7, 2013 15:02
A practical example to show how you can connect to a Virtuoso quad-store with python and rdflib.
from rdflib.graph import ConjunctiveGraph as Graph
from rdflib.store import Store
from rdflib.plugin import get as plugin
from rdflib.term import URIRef
Virtuoso = plugin("Virtuoso", Store)
store = Virtuoso("DSN=VOS;UID=dba;PWD=dba;WideAsUTF16=Y")
default_graph_uri = "http://www.w3.org/People/Berners-Lee/card"
graph = Graph(store,identifier = URIRef(default_graph_uri))