Skip to content

Instantly share code, notes, and snippets.

View sezanzeb's full-sized avatar
💭
I may be slow to respond.

Tobi sezanzeb

💭
I may be slow to respond.
View GitHub Profile
pkgname=soundconverter-git
pkgver=3.0.0+beta1+1+g9919e80
pkgrel=1
pkgdesc="A simple sound converter application for GNOME"
arch=('any')
url="http://soundconverter.org/"
license=('GPL3')
depends=('python-gobject' 'gst-python' 'gst-plugins-ugly' 'desktop-file-utils' 'gst-plugins-good')
makedepends=('git' 'python-distutils-extra')
provides=('soundconverter')
#!/usr/bin/python3
"""Transform all function names to snake case."""
import os
import re
def extract_function_name(line):
"""Get the test function name written in that line or None."""
#!/usr/bin/python
import os
import re
def find_xkb_names_in_file(path):
"""Return a set of all keys used in this xkb symbols file."""
keys = set()
with open(path) as f:
# https://gist.github.com/sezanzeb/1236917f509f13d30010c98c9fa8389f
Cyrillic_ve, parenleft, SunVideoLowerBrightness, KP_6, Q,
uparrow, Cyrillic_yu, Sinh_ca, Cyrillic_YA, Thai_ru,
dead_belowdot, XF86Keyboard, zacute, Greek_beta, Greek_PSI,
Sinh_cha, XF86AudioMicMute, Shift_Lock, onesixth, Kana_Lock,
Cyrillic_zhe_descender, Arabic_ddal, iacute, Greek_kappa, W,
Ooblique, dead_stroke, Sinh_oo, dollar, Arabic_comma,
hebrew_yod, V, egrave, hpDeleteLine, Undo, Armenian_tyun,
Armenian_exclam, Arabic_keheh, Greek_omega, includedin,
partialderivative, Arabic_ha, Otilde, Sinh_ai, Georgian_tar,
@sezanzeb
sezanzeb / wizard.ts
Last active March 13, 2023 11:09
Example on how to get providers into dynamic objects
import { INestApplication, Injectable, Logger, Module } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
/**
* A kind of hero that casts spells.
*/
class Wizard {
constructor(
private readonly name: string,
private readonly level: number,
@sezanzeb
sezanzeb / mongodb-hello-world.js
Created June 6, 2023 08:50
MongoDB Quickstart / hello-world
// docker run --name mongodb -d -p 27017:27017 mongodb/mongodb-community-server:latest
const { MongoClient } = require('mongodb')
async function main() {
const mongoClient = await MongoClient.connect('mongodb://localhost:27017/')
const db = mongoClient.db('test')
const collection = db.collection('test')