Skip to content

Instantly share code, notes, and snippets.

Avatar

maxcrom maxcrom

  • SAMSUNG Electronics. Ltd.
  • South Korea
View GitHub Profile
@maxcrom
maxcrom / pandas_postgres.py
Created Mar 31, 2021 — forked from kunanit/pandas_postgres.py
Read postgres database table into pandas dataframe
View pandas_postgres.py
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 Jun 19, 2020 — forked from wrouesnel/gist:6240468b75c6d72053ed
Updating system SSL and java keystore in a docker build
View gist:a983003d9017be48b8376f677651432f
# 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 Feb 6, 2020 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel10k

Powerlevel10k

View A Github Flavored Theme for Ipython or Jupyter Notebook.md

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 Nov 13, 2018
Kotlin Example
View Main.kt
fun max(a: Int, b: Int) = if (a > b) a else b