(All hints are encoded in base64)
Q1 Here's a Django view that serves an HTML response, whose content depends on a request query parameter:
def hello_view(request, name):
return HttpResponse(f'<html><body><p>Hello {name}</p></body></html>')
(All hints are encoded in base64)
Q1 Here's a Django view that serves an HTML response, whose content depends on a request query parameter:
def hello_view(request, name):
return HttpResponse(f'<html><body><p>Hello {name}</p></body></html>')
fswatch -o presentation.md | xargs -n1 -I{} ./make-presentation.sh presentation.html |
#| | |
JSON parser implemented with cl-lex and CL-Yacc | |
USAGE: | |
JSON-PARSER> (parse-with-lexer (json-lexer | |
"{\"foo\":\"bar\",\"baz\":\"bang\",\"bing\":100,\"bingo\":1.1,\"bazo\": [1,2,\"foo\"]}") | |
json-parser) | |
(:OBJ ("foo" . "bar") ("baz" . "bang") ("bing" . 100) ("bingo" . 1.1) ("bazo" 1 2 "foo")) | |
JSON-PARSER> (with-open-file (*standard-input* "test.json") |
;;;; mem-usage.lisp | |
;;; MEM-USAGE returns memory used by Lisp image in a plist. | |
;;; MEM-USED prints memory allocated while running the given forms. | |
;;; Works on SBCL, CMUCL, CCL and CLISP. | |
;;; Relies on internal APIs (the ones that ROOM uses). Can break at any time. | |
(defpackage #:mem-usage | |
(:use #:cl) | |
(:export #:mem-usage #:mem-used)) |
An example:
cat file.ext | split -b 4m - file.ext.
This will create:
file.ext.aa
openssl genrsa -out domain_name.key 2048
openssl req -new -sha256 -key domain_name.key -out domain_name.csr
Monitor tcp connections in a particular process
nettop -m tcp -p <proc-name>
Monitor tcp connetions in a process (delta mode)
nettop -m tcp -p -d
#include <stdio.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
int bind_and_listen (int port, int backlog) { | |
int listen_fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); | |
if (listen_fd == -1) { | |
perror("socket"); |
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig | |
export PATH=/usr/bin:$PATH | |
export LDFLAGS=-L/usr/lib64:/usr/lib | |
export LD_LIBRARY_PATH=/usr/lib64:/usr/lib | |
export CPPFLAGS=-I/usr/include | |
sudo yum-config-manager --enable epel | |
#sudo yum update -y | |
sudo yum install -y gcc gcc-c++ glib2-devel.x86_64 libxml2-devel.x86_64 libpng-devel.x86_64 \ | |
libjpeg-turbo-devel.x86_64 gobject-introspection.x86_64 gobject-introspection-devel.x86_64 |