Skip to content

Instantly share code, notes, and snippets.

View zubayerahamed's full-sized avatar
🕶️
Coffee, Coke, Code, Cool

Zubayer Ahamed zubayerahamed

🕶️
Coffee, Coke, Code, Cool
View GitHub Profile

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

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

$ mkdir test

$ cd test

@zubayerahamed
zubayerahamed / zpl_command.md
Created August 24, 2018 13:11
How to print ZPL file using terminal on linux

to see which printer is availabe in this system , simply type

lpstat -p -d

Output: printer HP-LaserJet-1200 is idle. enabled since Thu 09 Aug 2018 01:29:05 PM +06 printer Zebra-Technologies-ZTC-GK420t is idle. enabled since Fri 24 Aug 2018 05:54:04 PM +06 printer ZTC-GK420t is idle. enabled since Fri 24 Aug 2018 05:54:04 PM +06 system default destination: Zebra-Technologies-ZTC-GK420t

@zubayerahamed
zubayerahamed / application.properties
Created December 8, 2018 16:28
Postgresql database configuration for Spring Boot app
# Set here configurations for the database connection
spring.datasource.platform=postgres
spring.datasource.url= jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=**_password_**
spring.datasource.driver-class-name=org.postgresql.Driver
# Keep the connection alive if idle for a long time (need in production)
spring.datasource.dbcp2.test-while-idle=true
spring.datasource.dbcp2.validation-query=SELECT 1
@zubayerahamed
zubayerahamed / gulpfile.babel.js
Created November 7, 2020 12:58
Gulp file to automate WordPress theme development workflow
import gulp from 'gulp';
import yargs from 'yargs';
import sass from 'gulp-sass';
import cleanCSS from 'gulp-clean-css';
import gulpif from 'gulp-if';
import sourcemaps from 'gulp-sourcemaps';
import imagemin from 'gulp-imagemin';
import del from 'del';
import webpack from 'webpack-stream';
import uglify from 'gulp-uglify';