Skip to content

Instantly share code, notes, and snippets.

View jabbalaci's full-sized avatar

Laszlo Szathmary jabbalaci

View GitHub Profile
@jabbalaci
jabbalaci / stations.csv
Last active April 30, 2023 15:30
Online Radio Stations
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
id;stream;homepage
slay;http://relay3.slayradio.org:8000/;http://www.slayradio.org/home.php
bestfm;http://stream.webthings.hu:8000/fm95-x-128.mp3;http://www.bestfm.hu
retro;https://icast.connectmedia.hu/5001/live.mp3
kossuth;http://stream002.radio.hu/mr1.mp3;http://www.mr1-kossuth.hu/
szkr;http://radio.szentkoronaradio.com:8048/;http://radio.szentkoronaradio.com
maria;http://www.mariaradio.hu:8000/mr;http://www.mariaradio.hu
@jabbalaci
jabbalaci / top10.sh
Created April 12, 2023 12:52
top10dirs and top10files
# Add the following lines to the end of your ~/.bashrc file:
alias top10dirs='(du -h --max-depth=1) 2> /dev/null | sort -hr | head -n 10'
alias top10files='find . -type f -print0 | du -h --files0-from=- | sort -hr | head -n 10'
@jabbalaci
jabbalaci / graph.dot
Created February 3, 2023 17:36
graphviz example
// https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
digraph D {
graph [concentrate=true];
layout=neato;
// rankdir=LR;
edge [dir=none];
6 -> 4 -> 5;
4 -> {6 3 5};
@jabbalaci
jabbalaci / mdgo.sh
Created January 25, 2023 09:29
mdgo: mkdir folder; cd folder
# these work in both Bash and ZSH
alias md="mkdir"
alias ..="cd .."
alias ...="cd ../.."
mdgo () {
if [[ -z "$1" ]]
then
echo "Usage: mdgo <dir>"
@jabbalaci
jabbalaci / equation.py
Created December 21, 2022 12:54
Solving an equation with Sympy
#!/usr/bin/env python3
import sympy
from sympy.parsing.sympy_parser import parse_expr
def main():
text = "(4 + (2 * (x - 3))) / 4 = 150"
equation = "(4 + (2 * (x - 3))) / 4 - 150"
p = parse_expr(equation)
@jabbalaci
jabbalaci / 01.bash_shortcuts_v2.md
Created December 8, 2022 16:24 — forked from tuxfight3r/01.bash_shortcuts_v2.md
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@jabbalaci
jabbalaci / settings.json
Created November 15, 2022 16:08
My VS Code settings (Nov. 15,2022)
{
"files.eol": "\n",
"editor.codeLens": false,
"workbench.colorTheme": "Default Light+",
"workbench.colorCustomizations": {
"editor.background": "#fcf5e3",
"sideBar.background": "#f9edcd",
// "editor.lineHighlightBackground": "#e9f2fa",
"editor.lineHighlightBackground": "#efefef",
// "editor.lineHighlightBorder": "#9292ac"
@jabbalaci
jabbalaci / gist:410b818dc209edf3561322b06fab70aa
Created October 3, 2022 17:44
001a - Python virtuális környezetek
# aliases for the video https://www.youtube.com/watch?v=ETLb4moY4Rc
alias venv_init="python3 -m venv .venv"
alias venv_freeze="pip freeze --local"
alias on="deactivate 2>/dev/null; source .venv/bin/activate"
# alias on="source .venv/bin/activate"
alias off="deactivate"
@jabbalaci
jabbalaci / ghpp.py
Created May 17, 2012 06:30
Random Python projects from GitHub.
#!/usr/bin/python
"""
Random Python projects from GitHub.
The first one is a popular one from the Top 100.
The second one is from the rest.
"""
import random
@jabbalaci
jabbalaci / julia.json
Last active October 24, 2021 09:17
Unicode Input Symbols for Julia (for VS Code)
{
"alap": {
"prefix": "alap",
"body": [
"#!/usr/bin/env julia",
"",
"function main()",
" println(\"hello$0\")",
"end",
"",