Skip to content

Instantly share code, notes, and snippets.

View MediaByte's full-sized avatar
👋
Hello World!

Mario Martin MediaByte

👋
Hello World!
  • Cambridge, MA
View GitHub Profile
@MediaByte
MediaByte / nodejs-cheatsheet.js
Created September 22, 2019 19:30 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@MediaByte
MediaByte / psycopg2_sshtunnel.py
Created August 5, 2019 00:37 — forked from deehzee/psycopg2_sshtunnel.py
How to Connect To PostgreSQL Using SSHTunnelForwarder and Psycopg2
import psycopg2
from sshtunnel import SSHTunnelForwarder
# For interactive work (on ipython) it's easier to work with explicit objects
# instead of contexts.
# Create an SSH tunnel
tunnel = SSHTunnelForwarder(
('128.199.169.188', 22),
ssh_username='<username>',
@MediaByte
MediaByte / redis_cheatsheet.bash
Created March 3, 2019 01:42 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@MediaByte
MediaByte / README-Template.md
Created February 28, 2019 03:36 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@MediaByte
MediaByte / postgres cheatsheet.md
Created February 13, 2019 04:41 — forked from apolloclark/postgres cheatsheet.md
postgres cheatsheet

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

@MediaByte
MediaByte / typescript_cheatsheet.ts
Created December 21, 2018 02:13 — forked from petcarerx/typescript_cheatsheet.ts
Typescript Cheat Sheet - Syntax features and examples
// _____ __ _ _
///__ \_ _ _ __ ___/ _\ ___ _ __(_)_ __ | |_
// / /\/ | | | '_ \ / _ \ \ / __| '__| | '_ \| __|
// / / | |_| | |_) | __/\ \ (__| | | | |_) | |_
// \/ \__, | .__/ \___\__/\___|_| |_| .__/ \__|
// |___/|_| |_|
//Typescript Cheat Sheet: every syntax feature exemplified
//variables are the same as javascript, but can be defined with a type:
var myString:string;
@MediaByte
MediaByte / nvmCommands.js
Created November 12, 2018 17:35 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node
//Resources:
//https://www.postgresql.org/docs/10/static/sql-commands.html < --- PostgreSQL API Documentation
//https://www.techonthenet.com/postgresql/index.php < --- Tutotial
//Some Common Commands
//Start PostgreSQL
brew services start postgresql
//Stop PostgreSQL
Using Git
===============
Branch
-----------
Show branches:
`git branch`
Create branch: