Skip to content

Instantly share code, notes, and snippets.

View mgramin's full-sized avatar

Maksim Gramin mgramin

View GitHub Profile
@mgramin
mgramin / sql_educational_plan.md
Last active September 27, 2022 16:43
SQL Educational Plan

SQL educational plan

0. Setup environment

Topics:

  • What is DBeaver (GUI tool for working with databases)?

Tasks:

@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active December 2, 2025 18:02
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@bmillemathias
bmillemathias / db_feeder_with_faker.py
Last active September 24, 2025 22:49
An example how to use Faker python library to create fake data and inject them in a mysql database
#!/usr/bin/env python
# an example how to use Faker to create fake data and inject them
# in a mysql database
import time
import os
import mysql.connector
from mysql.connector import Error
from faker import Faker
from flask import Flask
from flask_restful import Api, Resource, reqparse
app = Flask(__name__)
api = Api(app)
users = [
{
"name": "Nicholas",
"age": 42,
@berkayunal
berkayunal / ._ Loading variables from .env files in Ansible.md
Created January 16, 2018 20:42
Loading variables from .env files in Ansible

Loading variables from .env files in Ansible

Ansible has various ways of looking up data from outside sources, including plain text password files, CSV files and INI files. But it doesn't seem to have a lookup for .env files, as used in Laravel projects, also available for PHP, Ruby, Node.js, Python and others.

One option is to launch Ansible with the Ruby dotenv command line script... But that requires Ruby, which seems like overkill to me.

So here is a simpler solution that I use. It consists of:

  1. The .env file itself
  2. A small shell script that loads the .env file into environment variables - ansible-playbook.sh
@yonglai
yonglai / playbook_centos_install_docker.yaml
Created November 15, 2017 18:04
An Ansible playbook to install docker-ce on Centos
---
- name: Install docker
gather_facts: No
hosts: default
tasks:
- name: Install yum utils
yum:
name: yum-utils
state: latest
@amihaiemil
amihaiemil / mgramin_sql-boot_review.md
Last active October 24, 2017 06:47
2017 Award Review for mgramin/sql-boot
@dennisobrien
dennisobrien / Markdown.JavaScript.md.js
Created October 1, 2017 04:52
DataGrip extension to export results to markdown.
/*
* DataGrip extension to export results to markdown.
* The markdown table format is supported by Github and Jira. I haven't tested others.
*
* Tested on DataGrip 2016.2.2
* - Open the File view. View -> Tool Windows -> Files
* - Activate the "Scratches" tab. You should see "Files", "Scopes", and "Scratches".
* - Copy this file to Extensions/Database Tools and SQL/data/extractors/Markdown.JavaScript.md.js
* - Run a query with some results.
* - Change the export format to Markdown.JavaScript.md.js and click "To Clipboard".
@existme
existme / Generate Markdown.groovy
Created September 29, 2017 13:14
This script will copy the selected table schemas as markdown tables into the clipboard. #IntelliJ #db #database #extractors #schema
import com.intellij.database.model.DasTable
import com.intellij.database.model.ObjectKind
import com.intellij.database.util.Case
import com.intellij.database.util.DasUtil
SEPARATOR = ","
QUOTE = "\""
NEWLINE = System.getProperty("line.separator")
SEPARATOR = File.separator
SPACING = " "
@hearimm
hearimm / UnderScoreToCamelCase.sql
Created August 25, 2017 04:10
Oracle TableColumn Underscore to Camelcase
SELECT LOWER(SUBSTR(COLUMN_NAME,0,1)) || SUBSTR(REPLACE(INITCAP(COLUMN_NAME),'_',''),2)
FROM ALL_TAB_COLS
WHERE TABLE_NAME = 'ADC_DL_MODEL'
;
--from : HELLO_WORLD
--to : helloWorld