Skip to content

Instantly share code, notes, and snippets.

View elmcrest's full-sized avatar
🤩

Marius Räsener elmcrest

🤩
View GitHub Profile
@elmcrest
elmcrest / checkPi.py
Created February 19, 2021 11:00
simple script to wrap raspberry pi health wrap, tested on ubuntu 20.04 on a model 3 B.
#!/usr/bin/env python3
import subprocess
HEALTH_CHECK = 'sudo vcgencmd get_throttled'
MESSAGES = {
0: 'Under-voltage!',
1: 'ARM frequency capped!',
2: 'Currently throttled!',
3: 'Soft temperature limit active',
16: 'Under-voltage has occurred since last reboot.',
@elmcrest
elmcrest / id_ed25519.pub
Created November 3, 2020 13:39
ssh public key
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHjg3Ksyxf1kwFzLLvo9BMrOMvf3DCJqzbRSPceZViDC mr@malocher
@elmcrest
elmcrest / main.dart
Last active April 23, 2019 13:16
dart operator overloading
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1} times to India.');
}
}

Keybase proof

I hereby claim:

  • I am elmcrest on github.
  • I am elmcrest (https://keybase.io/elmcrest) on keybase.
  • I have a public key ASBSMa4k8LARoccedUO8DoeLI9Q0p5NZZR8cazY88TrP3Qo

To claim this, I am signing this object:

@elmcrest
elmcrest / Emil.md
Last active September 7, 2017 09:47

Ein Hund names Emil

Kommandos

Bitte darauf achten, die Kommandos exakt und eindeutig zu verwenden. Das ist nicht einfach, selbst hinterfragen wenn Emil nicht macht was er soll. Wenn er weiß was ihr wollt, macht er es zu 80%, mit Leckeries zu 95% :)

"sitz!" - Zeigefinger ausgestreckt nach oben - Emil setzt sich
"platz!" - flache Hand parallel zum Boden - Emil legt sich hin
"auf!" - Zeigefinger ausgestreckt nach oben - Emil setzt sich wieder (aus dem liegen)
"bleib!" - flache Hand wie Stopp-Schild - Emil bleibt stehen/sitzen
"aus!" - gib das aus dem Mund frei

@elmcrest
elmcrest / conf.txt
Last active June 17, 2017 21:02
config file for ethosdistro.com
maxgputemp 85
stratumproxy enabled
proxywallet 0x531813d4914290273c0a1223b37859A5aa3Dac2b
proxypool1 pool-eu.ethosdistro.com:5001
proxypool2 pool-usa.ethosdistro.com:5001
flags --cl-global-work 8192 --farm-recheck 200
globalfan 85
custompanel namokuAs7zUd
@elmcrest
elmcrest / l10n_problem.py
Created August 12, 2015 07:57
Django seems to format all numeric Values including Primary Keys when USE_L10N = True. Intended from Django?
# The Primary Key Field is the "default" from Django ORM - so no explicite definition
# Django==1.8
# USE_L10N = False
<div data-pk="12513" class="empty">
</div>
# USE_L10N = True locale = de_DE
<div data-pk="12.513">
</div>
# USE_L10N = True locale = en_US
import sys
if sys.version_info[0] >= 3:
text_type = str
string_types = str,
iteritems = lambda o: o.items()
itervalues = lambda o: o.values()
izip = zip
else:
Traceback (most recent call last):
File "/home/mr/.virtualenvs/uberblick/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/home/mr/.virtualenvs/uberblick/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/mr/.virtualenvs/uberblick/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/mr/.virtualenvs/uberblick/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/mr/.virtualenvs/uberblick/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request