Skip to content

Instantly share code, notes, and snippets.

View eznj's full-sized avatar

eznj

View GitHub Profile
@eznj
eznj / db_backup_commands.md
Created September 15, 2023 16:52 — forked from AtulKsol/db_backup_commands.md
Commands to backup & restore database
  1. pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
    Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql

    Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql

    -h is for host.
    -p is for port.
    -U is for username.
    -d is for database.

@eznj
eznj / gist:beffcad9e4ef7c04c173
Created March 13, 2016 08:06 — forked from mrdoob/gist:1326080
modified glview.c
/*
* This file is part of the OpenKinect Project. http://www.openkinect.org
*
* Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file
* for details.
*
* This code is licensed to you under the terms of the Apache License, version
* 2.0, or, at your option, the terms of the GNU General Public License,
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
* or the following URLs:
@eznj
eznj / gist:e75bfec47b2f2c49b886
Created March 13, 2016 08:06 — forked from mrdoob/gist:1325393
ffmpeg: recording the screen.
ffmpeg -f x11grab -b 1M -bt 2M -r 30 -s 512x512 -i :0.0+1,53 -an kinect.webm
@eznj
eznj / Regex:IP
Created October 15, 2012 08:59 — forked from yannisxu/Regex:IP
Regex:IP
((?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d))