Skip to content

Instantly share code, notes, and snippets.

View AybarsAcar's full-sized avatar
🎯
Focusing

Aybars Acar AybarsAcar

🎯
Focusing
View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active November 20, 2024 03:39
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@rppowell-lasfs
rppowell-lasfs / java-hibernate-sqlite.md
Last active March 10, 2024 19:12
Java Hibernate-Sqlite Simple Example 2018-04-22

Java Hibernate/Sqlite Example

Dependencies

// https://mvnrepository.com/artifact/org.hibernate/hibernate-core
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.16.Final'

// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.21.0.1'
@sunmeat
sunmeat / main.cpp
Last active October 8, 2024 12:20
client server UDP C++ example
CLIENT SIDE:
#include <iostream>
#include <winsock2.h>
using namespace std;
#pragma comment(lib,"ws2_32.lib")
#pragma warning(disable:4996)
#define SERVER "127.0.0.1" // or "localhost" - ip address of UDP server