Also things like this https://dev.to/euantorano/validating-strings-at-compile-time-in-zig-539h
What factors do you use to determine if a component needs a start
function separate from its constructor, or if the construction and starting should be done in one user function?
Can people here respond with their Java version, OS, processor and (System/getProperty "os.arch")
?
never mind, was just wondering if there is a meaningful difference between x86_64 or amd64, but I think they're the same
I'd put it all in the construction code unless/until some component is expensive to construct but cheap to restart, ideally your component library should have separate start / restart functions and use your restart if available (similar to reboot / warm-boot of an OS)
the one to look out for would be IA_64 but IIRC nobody actually uses that, intel lost that one
makes sense, thanks!
x86_64 and amd64 are about the same arch. IA_64 is Itanium, which is end-of-life architecture.
What is the extremely quick/simple way to serve https content from clojure? akin to python's ?
## generate certs using, $ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
## then run this from from python3
from http.server import HTTPServer, BaseHTTPRequestHandler
import ssl
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
self.wfile.write(b'Hello, world!')
httpd = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket,
keyfile="key.pem",
certfile='cert.pem', server_side=True)
httpd.serve_forever()
Does anybody know if jq
has got the equivalent of take-while
and drop-while
in Clojure?
Say somebody is always inputting malformed login data into your login form... what's a funny redirect to give them ?
...short of an electric shock
Hmm, good point, maybe jet should support that too: https://github.com/borkdude/jet
keep a set of IPs that are doing this and redirect them to one another
$ json=$(bb -e '(println (json/generate-string (map (fn [x] {:a x}) (range 10))))')
$ echo $json
[{"a":0},{"a":1},{"a":2},{"a":3},{"a":4},{"a":5},{"a":6},{"a":7},{"a":8},{"a":9}]
$ echo $json | bb -e '(->> (json/parse-stream *in* true) (drop-while #(< (:a %) 5)))'
({:a 5} {:a 6} {:a 7} {:a 8} {:a 9})
ah cool
hahaha
chat room of shame
i was thinking maybe just making a quick strobe.js page
#fff #000 #fff #000
or a tiled 1x1px gif that achieves the same even with noscript enabled... >=)
i think it is just 1 person but i have not been able to think of a humorous enough punishment yet.
Just be cautious what you put in, in case your boss ever reaches the same place 🙂
@sova no redirect, just have something like the animation on tunnelbear
just something popping up in the corner of the screen
animated