Skip to content

Instantly share code, notes, and snippets.

View AybarsAcar's full-sized avatar
🎯
Focusing

Aybars Acar AybarsAcar

🎯
Focusing
View GitHub Profile
@sunmeat
sunmeat / main.cpp
Last active November 27, 2023 20:04
client server UDP C++ example
View main.cpp
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
@rppowell-lasfs
rppowell-lasfs / java-hibernate-sqlite.md
Last active October 19, 2023 18:26
Java Hibernate-Sqlite Simple Example 2018-04-22
View java-hibernate-sqlite.md

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'
@Kartones
Kartones / postgres-cheatsheet.md
Last active November 29, 2023 11:41
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

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)