Skip to content

Instantly share code, notes, and snippets.

@miskolc
miskolc / python_mailer_smtplib.py
Created July 30, 2019 14:18 — forked from ruanbekker/python_mailer_smtplib.py
Python SMTP Mailer using Amazon SES (smtplib)
import sys
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
name = "Ruan"
from_address = "no-reply@mydomain.com"
to_address = "ruan@mydomain.com"
subject = "Test"
@miskolc
miskolc / sqlite.sh
Last active May 2, 2019 12:34
sqlite export data labels
$ sudo docker volume ls
DRIVER VOLUME NAME
local ubuntu
ubuntu@ip-10-6-40-184:~$ sudo docker volume inspect
"docker volume inspect" requires at least 1 argument.
See 'docker volume inspect --help'.
Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
Display detailed information on one or more volumes
sudo docker build -t build_dynamic_geofences .
sudo docker run build_dynamic_geofences
sudo docker build -t apply_dynamic_geofences .
sudo docker run apply_dynamic_geofences
sudo docker build -t compute_at_venue_time .
sudo docker run compute_at_venue_time
@miskolc
miskolc / jupyter_shortcuts.md
Last active December 25, 2017 12:02 — forked from kidpixo/jupyter_shortcuts.md
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Jupyter Lab Shortcuts

Keyboard shortcuts

The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.

MacOS modifier keys:

  • ⌘ : Command
@miskolc
miskolc / 00.howto_install_phantomjs.md
Created August 13, 2016 16:45 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@miskolc
miskolc / socksproxy.js
Created December 1, 2015 13:26 — forked from telamon/socksproxy.js
Socks5 proxy implementation in Node.JS
// http://www.ietf.org/rfc/rfc1928.txt
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar
var States = {
CONNECTED:0,
VERIFYING:1,
READY:2,
PROXY: 3
};
@miskolc
miskolc / gitlab-sidekiq.conf
Last active August 28, 2015 21:20 — forked from jirutka/gitlab-sidekiq.conf
Upstart job configuration files (aka runscripts) for GitLab CE.
#!upstart
description "GitLab (Sidekiq)"
author "Jakub Jirutka"
start on starting gitlab
stop on stopping gitlab
env sidekiq_logfile="/var/log/gitlab/sidekiq.log"
env sidekiq_queues="-q post_receive -q mailer -q system_hook
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Martin Bean" />
<title>Twitter&rsquo;s Bootstrap with Ryan Fait&rsquo;s Sticky Footer</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<style>
html, body {
height: 100%;
@miskolc
miskolc / gist:5c00f413fd006388d956
Created January 9, 2015 11:18
Pretty print Git commit diffs as HTML document using aha
sudo apt-get install aha
git log --color-words --oneline | aha > index.html
git whatchanged --color-words --since="100 days ago" -p | aha >> index.html
firefox index.html
@miskolc
miskolc / gist:b21f784740b414d975f3
Created June 21, 2014 19:31
Compilation commands
LIBS="-lopencv_imgproc -lopencv_highgui -lopencv_core -lopencv_objdetect"
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -L/usr/lib -L/usr/local/lib -fpic -Wall -c "faces.cpp" $LIBS
//create shared library
g++ -shared -I/usr/local/include/opencv -I/usr/local/include/opencv2 -o libfaces.so faces.o -L/usr/local/lib $LIBS
//create executable (in case you want to play with it directly)
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -o faces faces.o -L/usr/local/lib $LIBS