Processing JSON using jq
jq is useful to slice, filter, map and transform structured json data.
Installing jq
On Mac OS
brew install jq
import subprocess | |
from getpass import getpass | |
# DDL - data definition language | |
# Remove user and database | |
subprocess.call('psql -U postgres -c "DROP DATABASE my_db;"', shell=True) | |
subprocess.call('psql -U postgres -c "DROP USER my_user;"', shell=True) | |
# Create user ad hoc, P is password, E is ENCRYPTED. |
jq is useful to slice, filter, map and transform structured json data.
brew install jq
IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
sudo apt upgrate
sudo fallocate -l 4G /swapfile
Most of this are inspired or stolen from ChatGPT Jailbreak but edited to better match Discord's ClydeAI.
title | author | date | source | notoc |
---|---|---|---|---|
LDAP Search Filter Cheatsheet |
Jon LaBelle |
January 4, 2021 |
true |
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |