Skip to content

Instantly share code, notes, and snippets.

View meawoppl's full-sized avatar
💭
💻 🔨 🔥 😆

MattyG meawoppl

💭
💻 🔨 🔥 😆
View GitHub Profile
x="if(t%2)else";python3 -c"[print(t>>15&(t>>(2$x 4))%(3+(t>>(8$x 11))%4)+(t>>10)|42&t>>7&t<<9,end='')for t in range(2**20)]"|aplay -c2 -r4
@meawoppl
meawoppl / thumbnailer.py
Last active May 11, 2024 18:55
Nautilus Thumbnail Generator. Python 3 scalable and fast.
#!/usr/bin/python3
import concurrent.futures
import hashlib
import os
import sys
import gi
gi.require_version('GnomeDesktop', '3.0')
from gi.repository import Gio, GnomeDesktop
@meawoppl
meawoppl / build.gradle
Created December 14, 2020 06:43
Add MathJax to JavaDoc in Gradle
javadoc {
configure(options) {
options.addBooleanOption("-allow-script-in-comments",true)
options.header = "<script type=\"text/javascript\" async" +
" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML\">" +
"</script>"
}
}
// Then just use $$ e^{/pi i} + 1 == 0 $$ wherever the mood so strikes.
@meawoppl
meawoppl / gist:e40716e01db411a3242a218be69a4930
Created March 11, 2021 18:29
Add MathJax support to javaDoc via gradle
// This adds support for mathjax to javadocs
javadoc {
configure(options) {
options.overview = "src/main/javadoc/overview.html" // relative to source root
options.addBooleanOption("-allow-script-in-comments",true)
options.header = "<script type=\"text/javascript\" async" +
" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML\">" +
"</script>"
}
}
main [2022-01-07 20:24:26,054] ERROR in app: Exception on /camera/snap [GET]
main Traceback (most recent call last):
main File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2070, in wsgi_app
main response = self.full_dispatch_request()
main File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1515, in full_dispatch_request
main rv = self.handle_user_exception(e)
main File "/usr/local/lib/python3.6/site-packages/flask_cors/extension.py", line 165, in wrapped_function
main return cors_after_request(app.make_response(f(*args, **kwargs)))
main File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1513, in full_dispatch_request
main rv = self.dispatch_request()
Jan 24 21:39:09 49afb35 systemd[1]: balena.service: Watchdog timeout (limit 6min)!
Jan 24 21:39:09 49afb35 systemd[1]: balena.service: Killing process 3391 (balenad) with signal SIGABRT.
Jan 24 21:39:09 49afb35 balenad[3391]: SIGABRT: abort
Jan 24 21:39:09 49afb35 balenad[3391]: PC=0x4618d4 m=0 sigcode=0
Jan 24 21:39:09 49afb35 balenad[3391]: goroutine 0 [idle]:
Jan 24 21:39:09 49afb35 balenad[3391]: runtime.futex(0x2ce1088, 0x80, 0x0, 0x0, 0x7f00000000, 0x4388b0, 0x0, 0x0, 0x7ffcd98468, 0x437018, ...)
Jan 24 21:39:09 49afb35 balenad[3391]: /usr/lib/go/src/runtime/sys_linux_arm64.s:417 +0x1c
Jan 24 21:39:09 49afb35 balenad[3391]: runtime.futexsleep(0x2ce1088, 0x0, 0xffffffffffffffff)
Jan 24 21:39:09 49afb35 balenad[3391]: /usr/lib/go/src/runtime/os_linux.go:46 +0x3c
Jan 24 21:39:09 49afb35 balenad[3391]: runtime.notesleep(0x2ce1088)
@meawoppl
meawoppl / tiny.py
Created February 25, 2022 20:57
Do with this what you will
import itertools
import urllib.request
import concurrent.futures
def waste_captca():
return len(urllib.request.urlopen("https://eais.rkn.gov.ru/services/securimage/show/?5ced0981b6c71407228991525572f2e3").read())
wasted_bytes = 0
[ 4937.495336] bcm2835_mmal_vchiq: buffer_from_host: msg_context not allocated, buf 000000008ba17383
[ 4937.495362] bcm2835-isp bcm2835-isp: bcm2835_isp_node_start_streaming: Failed enabling port, ret -22
[ 4937.495433] ------------[ cut here ]------------
[ 4937.495460] WARNING: CPU: 1 PID: 11152 at drivers/media/common/videobuf2/videobuf2-core.c:1548 vb2_start_streaming+0xd4/0x130 [videobuf2_common]
[ 4937.495465] Modules linked in: ip6t_REJECT nf_reject_ipv6 ip6table_filter xt_state ipt_REJECT nf_reject_ipv4 ip6_tables xt_MASQUERADE nf_conntrack_netlink nfnetlink br_netfilter cmac algif_hash aes_arm64 algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc xt_owner i2c_dev imx219 spidev brcmfmac brcmutil cfg80211 rfkill v3d gpu_sched bcm2835_codec(C) bcm2835_unicam bcm2835_v4l2(C) bcm2835_isp(C) v4l2_mem2mem v4l2_dv_timings bcm2835_mmal_vchiq(C) i2c_mux_pinctrl videobuf2_dma_contig v4l2_fwnode raspberrypi_hwmon videobuf2_vmalloc i2c_mux videobuf2_memops videobuf2_v4l2 videobuf2_common spi_bcm2