Skip to content

Instantly share code, notes, and snippets.

View peterholak's full-sized avatar

Peter Holák peterholak

View GitHub Profile
@peterholak
peterholak / oct-proof1-enc
Created April 25, 2020 19:49
oct-proof1-enc
U2FsdGVkX1+8VImIUH1btrv2yEOUcym5ZP2YFZsrryz52t3rs6och0ZwQPGosjvbScJMW19xsTWO
lVlgu0l+N4f8Yg8BM8Npd9aL8p7vF5rtzCSU5FfklnphlasNbekRRGE7bId6Fk43oZb/u9bzI6E8
RVF1ttwN5DBw42kZ+V/gqOJJpOE8cmi/18Dua6KcVfs1NTgiokPONCA5FhbAHT73gV+/pMlZAXBU
DhL0x48ZIE+q0JPtpXpt4+LpTsxS5SYNYtvXnLEvMtq2HtmcofHQ4FXqtV2a+n50SwkpaiDPLBJc
smIBXZgWE77C9rDabRVRgku9KfazxuSUbl+0rij/uBb5avqf4ngJ7h/QJc5NbOLsaqBUtr1bwPxe
Jo1aAc+n0gFS4VBvIFIUxLwLGaOOFsO6SK9Cnz/mk2XoeBrL9vm5RJ1SWNLr9jXQ3j9Ge1XTFiVs
dXC96eKy1L4WH4VGpqRUiXeQf+XIQGYD3+t1vNgEC5Dh9JcZa14d3zyMtvKz4uZJoVNWk0OFCnKK
vvRp2mIQVkHzKxhIl9K9In8HMr9HP2SEGzGCooyzzklhvWFI4hWdXeLCIRrtLQ3O/ML03NVm5GYa
zRgqaeyVVsU8ewkM85aCPRaDu9UuUzDjbTCofUVaf5pRbusMe0p3eecrrkADDbekbd6gkKk26/VN
IXcHmg7E01XINaxzuRTaQ3yTLFe3p/B47xnsdv/6d76FnUgqKTU/LIdrbxDGk7R6OSdbvAdLzkTe
@peterholak
peterholak / AutoScrollingTextarea.tsx
Last active June 3, 2022 09:04
React textarea component that scrolls to the bottom whenever its content changes
/*
Copyright 2017 Peter Holak
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
@peterholak
peterholak / printers.py
Created January 26, 2016 11:51
Modified parts of the gdb STL printers to allow expanding of shared_ptr and unique_ptr in CLion
class SharedPointerPrinter:
"Print a shared_ptr or weak_ptr"
def __init__ (self, typename, val):
self.typename = typename
self.val = val
def to_string (self):
state = 'empty'
refcounts = self.val['_M_refcount']['_M_pi']