Skip to content

Instantly share code, notes, and snippets.

View maxcrom's full-sized avatar

maxcrom maxcrom

  • SAMSUNG Electronics. Ltd.
  • South Korea
View GitHub Profile
@maxcrom
maxcrom / pandas_postgres.py
Created March 31, 2021 07:18 — forked from kunanit/pandas_postgres.py
Read postgres database table into pandas dataframe
import pandas as pd
from sqlalchemy import create_engine
# follows django database settings format, replace with your own settings
DATABASES = {
'production':{
'NAME': 'dbname',
'USER': 'user',
'PASSWORD': 'pass',
'HOST': 'rdsname.clqksfdibzsj.us-east-1.rds.amazonaws.com',
@maxcrom
maxcrom / gist:a983003d9017be48b8376f677651432f
Created June 19, 2020 05:09 — forked from wrouesnel/gist:6240468b75c6d72053ed
Updating system SSL and java keystore in a docker build
# Compile and install certificates for the Java trust keystore
# and main keystore. Let's face it, this is everyone's keystore password.
# Note I install java very flatly normally.
COPY trust-certs/ /usr/local/share/ca-certificates/
RUN update-ca-certificates && \
ls -1 /usr/local/share/ca-certificates | while read cert; do \
openssl x509 -outform der -in /usr/local/share/ca-certificates/$cert -out $cert.der; \
/java/bin/keytool -import -alias $cert -keystore /java/jre/lib/security/cacerts -trustcacerts -file $cert.der -storepass changeit -noprompt; \
rm $cert.der; \
done
@maxcrom
maxcrom / iterm2-solarized.md
Created February 6, 2020 14:51 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@maxcrom
maxcrom / 2017-06-18-064710_722x410_scrot.png
Created February 4, 2020 06:16 — forked from TrentSPalmer/2017-06-18-064710_722x410_scrot.png
fish powerline on ubuntu the easy way
2017-06-18-064710_722x410_scrot.png

Github Flavored Theme for Ipython/Jupyter Notebook

Put custom.css in .jupyter/custom/ (if you are running recent version of Jupyter).

Note: Tested only on Chrome. Let me know if something is not working.

img1 img1 img1

@maxcrom
maxcrom / Main.kt
Created November 13, 2018 03:44
Kotlin Example
fun max(a: Int, b: Int) = if (a > b) a else b