Skip to content

Instantly share code, notes, and snippets.

View saltyfireball's full-sized avatar
🏠
Working from home

saltyfireball

🏠
Working from home
View GitHub Profile
@saltyfireball
saltyfireball / Steps.MD
Last active March 21, 2020 19:48
Gunbot Trading View

copy:

function stripHTML(dirtyString) {
    var container = document.createElement('div');
    var text = document.createTextNode(dirtyString);
    container.appendChild(text);
    return container.innerHTML;
}
@saltyfireball
saltyfireball / pgAdmin4_pyenv.md
Last active December 21, 2018 01:04
Install pgAdmin4 v3.6 with pyenv on Ubuntu 18.04 DESKTOP MODE

Install pgAdmin4 v3.6 with pyenv on Ubuntu 18.04 DESKTOP MODE

This will also work with pyenv, but if its confusing I can make different notes.

Important!

Following these exact steps will not require a username and password to access pgadmin4, since its running in "desktop" mode.

1. Install python 3.6.5 with pyenv

pyenv install 3.6.5
@saltyfireball
saltyfireball / pgAdmin4_v3.6 _Ubuntu_18.04_python_3.6_DESKTOP.md
Last active March 6, 2019 06:19 — forked from Prototype-X/Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
Install pgAdmin4 v3.6 on Ubuntu 18.04 w/python 3.6 using DESKTOP mode

Install pgAdmin4 v3.6 on Ubuntu 18.04 w/python 3.6 using DESKTOP mode

This will also work with pyenv, but if its confusing I can make different notes.

Important!

Following these exact steps will not require a username and password to access pgadmin4, since its running in "desktop" mode.

1. Create virtualenv in dir ~/py3-venv-pgadmin (different if using pyenv)

virtualenv --system-site-packages --no-setuptools --python=python3.6 ~/py3-venv-pgadmin
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
@saltyfireball
saltyfireball / README.md
Last active August 10, 2018 15:40
Using Pillow to Convert jpg to png

Using Pillow to Convert jpg to png

Simple script to list all files in a files in a directory

*This assumes all files in folder are png images.

import os
from PIL import Image
@saltyfireball
saltyfireball / make_nb.py
Created August 7, 2018 21:29 — forked from takluyver/make_nb.py
Make a notebook from a script
"""Create a notebook containing code from a script.
Run as: python make_nb.py my_script.py
"""
import sys
import nbformat
from nbformat.v4 import new_notebook, new_code_cell
nb = new_notebook()
@saltyfireball
saltyfireball / django-runserver-ssl.md
Last active April 21, 2018 18:29 — forked from claudiosanches/django-runserver-ssl.md
Django - SSL with runserver

Instalation

brew install stunnel

Configuration

cd path/to/django/project
<?php
function get_tls_version($sslversion = null)
{
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
if ($sslversion !== null) {
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion);
}
@saltyfireball
saltyfireball / README.md
Created January 18, 2018 04:14 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@saltyfireball
saltyfireball / Brewfile
Created January 2, 2018 15:23
My Brew file (brew bundle dump) - Mac Development
tap "homebrew/dupes"
tap "homebrew/completions"
tap "homebrew/apache"
tap "homebrew/core"
tap "homebrew/php"
tap "homebrew/versions"
tap "homebrew/bundle"
tap "homebrew/services"
tap "goles/battery"
tap "caskroom/cask"