Skip to content

Instantly share code, notes, and snippets.

@rg3915
rg3915 / create_database.py
Last active March 21, 2023 11:30
Create PostgreSQL database with Python and click and modern command to create database postgres 2020
View create_database.py
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.
@olih
olih / jq-cheetsheet.md
Last active March 21, 2023 11:30
jq Cheet Sheet
View jq-cheetsheet.md

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@imba-tjd
imba-tjd / .Cloud.md
Last active March 21, 2023 11:28
☁️ 一些免费的云资源
View .Cloud.md

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

View redis_pubsub_demo.rb
# 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
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active March 21, 2023 11:26
Semantic Commit Messages
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@bradtraversy
bradtraversy / ssh.md
Last active March 21, 2023 11:25
SSH & DevOps Crash Course Snippets
View ssh.md

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@fomvasss
fomvasss / Linux.md
Last active March 21, 2023 11:22
Settings OS Linux after install
View Linux.md

After install OS

Upgrate OS

sudo apt upgrate

Add swap (optional)

sudo fallocate -l 4G /swapfile
@hackermondev
hackermondev / ClydeAI-Jailbreak.md
Created March 21, 2023 05:04
Discord ClydeAI jailbreak
View ClydeAI-Jailbreak.md
@jonlabelle
jonlabelle / ldap_search_filter_cheatsheet.md
Last active March 21, 2023 11:21
LDAP Search Filter Cheatsheet
View ldap_search_filter_cheatsheet.md
@htp
htp / curl-websocket.sh
Last active March 21, 2023 11:21
Test a WebSocket using curl.
View curl-websocket.sh
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/