Skip to content

Instantly share code, notes, and snippets.

View sdevn's full-sized avatar
🤓
Nilos 2.0

Nilos Psathas sdevn

🤓
Nilos 2.0
View GitHub Profile
@sdevn
sdevn / umap_sparse.py
Created January 6, 2024 16:09 — forked from johnhw/umap_sparse.py
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@sdevn
sdevn / virtualbox-extend-disk.md
Created April 30, 2022 00:29
Extend VirtualBox disk on Ubuntu 18.04 without LVM

After you increase drive's size through Virtual Media Manager, boot into Ubuntu (or connect via SSH) and run:

Verify that disk's size is not updated (also find your device path):

df -h

device path should be like /dev/sdaX, then run:

sudo growpart /dev/sda X
sudo resize2fs /dev/sdaX
@sdevn
sdevn / SSO and LDAP
Created June 30, 2021 17:40 — forked from Rambou/SSO and LDAP
Greek Universities SSO and LDAP servers
Agricultural University of Athens - https://sso.aua.gr/login - noc.aua.gr DN
Aristotle University of Thessaloniki - https://www.it.auth.gr/saml_login?custom_return=eForms%2Faai - ldap.auth.gr DN: o=auth,c=GR
Athens University of Economics and Business - https://sso.aueb.gr/login
Athens school of fine arts - https://sso.asfa.gr/login
Democritus University of Thrace - https://login.duth.gr
Harokopio University - https://sso.hua.gr/login
Hellenic Open University - https://login.eap.gr/idp/Authn/UserPassword
International Hellenic University - http://sso.ihu.edu.gr/idp/
Ionian University - https://sso.ionio.gr/login
National Technical University of Athens - https://login.ntua.gr/idp/Authn/UserPassword
@sdevn
sdevn / AudioRecordActivity.java
Created September 9, 2018 12:58 — forked from kmark/AudioRecordActivity.java
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* Copyright 2016 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software