Skip to content

Instantly share code, notes, and snippets.

View absk1317's full-sized avatar
🎯
Focusing

abhishek verma absk1317

🎯
Focusing
View GitHub Profile
@absk1317
absk1317 / sublime-user-settings
Created August 1, 2017 09:28
Sublime custom settings.
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_width": 2,
"caret_style": "solid",
"close_windows_when_empty": false,
"color_scheme": "Packages/Ecmascript Syntax/excelsior.tmTheme",
"drag_text": false,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": true,
@absk1317
absk1317 / sublime-key-bindings
Last active August 1, 2017 09:29
Sublime text key bindings.
[
{ "keys": ["super+down"], "command": "goto_definition" },
{ "keys": ["super+up"], "command": "jump_back" },
{ "keys": ["super+b"], "command": "insert", "args": {"characters": "binding.pry"} },
{"keys": ["alt+shift+f"], "command": "reindent", "args": {"single_line": false}},
{
"keys": ["super+shift+k"],
"command": "beautify_ruby"
}
]
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Start of Vundle settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Customize to your needs...
for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
export EDITOR="subl -n -w"
pm.sendRequest({
url: 'http://localhost:3000/api/v1/users/sign_in',
method: 'POST',
header: 'content-type:application/json',
body: {
mode: 'raw',
raw: JSON.stringify({ user: {
email: 'abcd@gmail.com',
password: "abcdef"
}})

Keybase proof

I hereby claim:

  • I am absk1317 on github.
  • I am absk1317 (https://keybase.io/absk1317) on keybase.
  • I have a public key whose fingerprint is FCFC C7B9 D934 ADB2 C5BA 7C19 A384 49E0 1B23 025F

To claim this, I am signing this object:

# === EDITOR ===
Pry.editor = 'vi'
# == Pry-Nav - Using pry as a debugger ==
Pry.commands.alias_command 'c', 'continue' rescue nil
Pry.commands.alias_command 's', 'step' rescue nil
Pry.commands.alias_command 'n', 'next' rescue nil
# === CUSTOM PROMPT ===
# This prompt shows the ruby version (useful for RVM)
@absk1317
absk1317 / string_balance_check.rb
Last active May 30, 2018 20:00
String balance check whether for brackets
require 'pry'
PAIRS = {
'{' => '}',
'[' => ']',
'(' => ')'
}.freeze
def balanced?(string)
return false if string.length.odd?
return false if string =~ /[^\[\]\(\)\{\}]/
@absk1317
absk1317 / GaugeChart.js
Last active June 24, 2018 11:05 — forked from emiloberg/GaugeChart.js
Gauge Chart with React Recharts (http://recharts.org)
import React from 'react';
import { Sector, Cell, PieChart, Pie, Tooltip } from 'recharts';
const GaugeChart = () => {
const width = 500;
const chartValue = 180;
const colorData = [{
value: 40, // Meaning span is 0 to 40
color: '#663399'
}, {

SchemaSpy is a neat tool to produce visual diagrams for most relational databases.

Here's how to use it to generate schema relationship diagrams for PostgreSQL databases:

  1. Download the jar file from here (the current version is schemaSpy_5.0.0.jar)

  2. Get the PostgreSQL JDBC driver (either the JDBC3 or JDBC4 jar file is fine)

  3. Run the command against an existing database. For most databases, the schema (-s option) we are interested in is the public one: