Skip to content

Instantly share code, notes, and snippets.

View lukasjoc's full-sized avatar
🏠
Working from home

Lukas lukasjoc

🏠
Working from home
View GitHub Profile
@lukasjoc
lukasjoc / README.md
Last active December 12, 2023 10:25
Export GitHub Projects Data to JSON

gh_projects_export

Export GitHub Projects Data to JSON

Needs:

export gh_user=USER
export gh_token=USER_ACCESS_TOKEN
# https://arxiv.org/pdf/2110.01111.pdf
In [42]: def sort_simple(l):
...: a = l
...: for i in range(len(a)):
...: for j in range(len(a)):
...: if a[i] < a[j]:
...: tmp = a[i]
@lukasjoc
lukasjoc / vimconfig_ec.vim
Created January 3, 2022 17:28
vim config for getting EditorConfig running/ Formatting in vim using `gg=G`
let g:EditorConfig_core_mode = "external_command"
let g:EditorConfig_exec_path = "/opt/homebrew/bin/editorconfig"
@lukasjoc
lukasjoc / functools.go
Created September 4, 2021 13:14
Try T type in go
package main
import (
"fmt"
)
// filter ...
func filter[T any](slice []T, filter func(i int, x T) bool) (o []T) {
for i, x := range slice {
if filter(i, x) {
@lukasjoc
lukasjoc / commenting.vim
Created August 4, 2021 06:50
Set Commenting and FileTypes
if has('autocmd')
" Commenting
augroup comment
au FileType c,cpp,rust,javascript,java,pde,scala,go,php,v,sv,proto let b:comment_leader = "// "
au FileType sh,yml,yaml,bash,python,pyx,nim let b:comment_leader = "# "
au FileType vim let b:comment_leader = '" '
au FileType tex let b:comment_leader = "% "
au FileType sql let b:comment_leader = "-- "
augroup END
@lukasjoc
lukasjoc / .gitconfig
Created February 25, 2021 18:30
git config with aliases
[core]
autocrlf = false
excludesfile = .gitignore
quotepath = false
editor = vim
[help]
autocorrect=1
[color]
@lukasjoc
lukasjoc / fix_phys.txt
Last active January 31, 2021 10:14
How to fix internet on arch vm when dhcp is not installed and how to fix wiifi connection when dhcpd ist installed
iwctl
device = device list (most certain its wlan0)
iwctl wlan0 scan
iwctl wlan0 ge-networks
choose suitable network and
iwctl wlan0 connect SSID (network name)
@lukasjoc
lukasjoc / join_frames_on_mssing_data.py
Last active April 21, 2020 09:34
get deltas from other frame and keep incoming frame
import pandas as pd
db_data = [
{"id": 1, "name": "Luads", "number": "000000000000", "number_active": 1},
{"id": 2, "name": "Luads", "number": "000000000000", "number_active": 1},
{"id": 3, "name": "Luads", "number": "000000000000", "number_active": 1},
{"id": 4, "name": "Lukas", "number": "000000000000", "number_active": 1},
{"id": 5, "name": "Luisd", "number": "000000000000", "number_active": 1},
{"id": 6, "name": "Jocham", "number":"000000000000", "number_active": 1},
]