This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; After connecting an nrepl client repl to an nrepl server, some | |
;; output will still appear on stdout from the server. | |
;; Try these snippets - they will both produce output on the nrepl server | |
;; Java libraries commonly do both these things. | |
(.println System/out "Hello stdout.") | |
(.start (Thread. #(println "Hello from a new thread."))) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pretty_request(request): | |
headers = '' | |
for header, value in request.META.items(): | |
if not header.startswith('HTTP'): | |
continue | |
header = '-'.join([h.capitalize() for h in header[5:].lower().split('_')]) | |
headers += '{}: {}\n'.format(header, value) | |
return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols | |
# wayland-scanner is a tool which generates C headers and rigging for Wayland | |
# protocols, which are specified in XML. wlroots requires you to rig these up | |
# to your build system yourself and provide them in the include path. | |
xdg-shell-protocol.h: | |
wayland-scanner server-header \ | |
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ | |
xdg-shell-protocol.c: xdg-shell-protocol.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the terminal launch the following command and restart Firefox: | |
sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool FALSE | |
To know more about policies => https://support.mozilla.org/en-US/products/firefox-enterprise/policies-customization-enterprise/policies-overview-enterprise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn sleep [s] | |
(-> (asyncio/sleep s) | |
(pp/then (fn [_] s)))) | |
(defn fun [] | |
(pp/let [x (sleep 1) | |
z (pp/resolved 5) | |
y (sleep 2)] | |
(+ x y z))) |