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 / dwi.gif
Last active May 27, 2020 01:36
🌴
dwi.gif
@eznj
eznj / approver.yml
Last active August 4, 2020 20:14
SQS structure sign-off service
provider: # s3, gcs
storage_location: # s3 location, gcs location
version: <generated schema vers>
approvals:
require_staging: true
required: 2
total: 1
team_a: 0
team_b: 1
structure:
#!/bin/bash
# check elastic stats
curl -XGET 'http://localhost:9200/_nodes/stats/os,process?pretty=true'
#!/bin/bash
yum install -y postgresql95 postgresql95-server postgresql95-libs postgresql95-contrib postgresql95-devel
@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
/^\b((?:https?:\/\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))$/
@eznj
eznj / star_wars.ino
Last active September 26, 2023 18:24
Arduino Star Wars Song
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;
const int b = 466;
const int cH = 523;
@eznj
eznj / underscore mustache conversion
Created January 24, 2013 22:03
underscore mustache style syntax conversion...
_.templateSettings = {
interpolate : /\{\{(.+?)\}\}/g
}