Skip to content

Instantly share code, notes, and snippets.

@deepak365
deepak365 / How to install redash in mac.
Last active May 27, 2022 05:38
How to install redash in mac.
What is redash?
Redash is database viewer included BI tool inside. Redash has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts.
Prerequisite :
1. Install docker
2. Install git
git clone https://github.com/getredash/redash.git
docker-compose -f docker-compose.production.yml run --rm server create_db
docker-compose -f docker-compose.production.yml up
@tonywhittaker
tonywhittaker / Query Copy Example.py
Last active February 24, 2022 02:01
Move data from MSSQL to Redshift with Luigi
class SomeExport(luigi.Task):
date = luigi.DateParameter(default=datetime.date.today())
def output(self):
return luigi.s3.S3Target(self.date.strftime('s3://mybucket/%Y%m%d.txt.gz'))
def requires(self):
return None
def run(self):
@kissgyorgy
kissgyorgy / sqlalchemy_conftest.py
Last active November 19, 2024 23:52
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
@pytest.fixture(scope="session")
def engine():
return create_engine("postgresql://localhost/test_database")
@deepakrpathak
deepakrpathak / wowContacts
Last active October 3, 2017 18:10
Contact book creator for Whatsapp on web
/* Whatsapp on Web Contacts
Author : Deepak Pathak
*/
(function() {
function t() {
var t = "<style>div{margin:1em;display:inline-block;max-width:300px}img{object-fit:cover;width:300px;height:200px;}span{float:right;font-size:.85em}h3{padding:10px 5px;font-size:1em}h2{margin:2em;font-size:1.1em;line-height:1.4em}</style>";
for (var e in list) t += action ? '<div><img src="' + list[e].thumb.replace("t=s", "t=l") + '"><h3>' + list[e].name + "<span>+" + e + "</span></h3></div>" : list[e].name + "," + e + "<br>";
action && (t += "<h2>Save as PDF by right-click -> Print.. or ctrl/cmd+p. <em>Written by <a href='http://deepakpathak.ghost.io/'>Deepak Pathak</a></em>.</h2>"), $("body").html(t).css("padding", "10px").css("overflow", "visible")
}
@bobbygrace
bobbygrace / trello-css-guide.md
Last active December 10, 2024 21:04
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active December 20, 2024 19:57
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k