Skip to content

Instantly share code, notes, and snippets.

View tlnagy's full-sized avatar

Tamas Nagy tlnagy

View GitHub Profile
@tlnagy
tlnagy / filescan.sh
Created June 19, 2022 00:07
Took me awhile to figure out how to run Nextcloud's file scan option inside of my Nextcloud instance which was hosted inside of a docker container
su -s /bin/bash www-data -c "php occ files:scan --all"
echo "Setup fresh PopOS install"
# check if root
if [[ $(id -u) -ne 0 ]]
then echo "Please run as root"
exit 1
fi
# rename computer
echo "eureka" > '/etc/hostname'
@tlnagy
tlnagy / resilio-bindfs.md
Last active January 10, 2020 21:56
resilio-sync-ubuntu-bindfs.md

Why? ACLs permissions are fragile in my hands and this works a lot better, IMO. Despite caveats.

Install resilio sync and run it as its own user

sudo apt install bindfs
@tlnagy
tlnagy / scaling.md
Created December 7, 2019 20:25
Fix UI scaling in Snap apps

On Kubuntu 19.10, snap apps install here:

/var/lib/snapd/desktop/applications

To fix UI scaling, I just add the following flag to each of the .desktop files for Electron apps in that folder

--force-device-scale-factor=1.2
@tlnagy
tlnagy / MuniScraper.jl
Last active January 7, 2020 02:22
A scraper for SF Muni train data (only tested on OpenSUSE Leap 15.1, Julia 1.1.1)
"""
Copyright (c) 2019 Tamas Nagy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am tlnagy on github.
  • I am tlngy (https://keybase.io/tlngy) on keybase.
  • I have a public key ASCZ0v6_xUtiDFmiRIqOknf6Zmu36GVYNVECLzJHKjTjbAo

To claim this, I am signing this object:

@tlnagy
tlnagy / multibin_crispulator.ipynb
Created February 9, 2018 22:29
Example of new multi-bin support in Crispulator
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tlnagy
tlnagy / type_example.jl
Last active March 15, 2016 20:45
Example of default constructor in julia
# type definition
type NewType
b::AbstractMatrix
end
# default constructor
# initializes a new `NewType` with a random
# 5x5 matrix stored in b
NewType() = NewType(rand(5,5))