Skip to content

Instantly share code, notes, and snippets.

View darkman66's full-sized avatar

Hubert Piotrowski darkman66

View GitHub Profile
import youtube_dl
def extract_url(yt_url):
ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s%(ext)s', 'quiet':True,})
video = ""
with ydl:
result = ydl.extract_info \
(yt_url,
download=False) #We just want to extract the info
#!/bin/sh
brew install rbenv/tap/openssl@1.0
brew install bison@2.7
OPENSSL_1_0_DIR=$(brew --prefix rbenv/tap/openssl@1.0)
alias bison="/usr/local/opt/bison@2.7/bin/bison"
export CPPFLAGS=-I${OPENSSL_1_0_DIR}/include
export LDFLAGS=-L${OPENSSL_1_0_DIR}/lib
FROM azul/zulu-openjdk:8u222
# Default payara ports to expose
# 4848: admin console
# 9009: debug port (JPDA)
# 8080: http
# 8181: https
EXPOSE 4848 9009 8080 8181
# Payara version (5.183+)
@darkman66
darkman66 / gist:2d5be57f3fc5abbe2a990331a1e9bc46
Created November 21, 2019 13:16
simple web server with netcat
while true ; do /usr/local/bin/nc -l -p 5000 -e 'echo -e "HTTP/1.1 200 OK\n\n $(cat /var/tmp/example.txt)"' ; done
$ brew install v8@3.15
$ bundle config build.libv8 --with-system-v8
$ bundle config build.therubyracer --with-v8-dir=$(brew --prefix v8@3.15)
$ bundle install
pg_upgrade -b /usr/local/Cellar/postgresql@10/10.6_1/bin -B /usr/local/Cellar/postgresql/11.1_1/bin -d /usr/local/var/postgres.0/ -D /usr/local/var/postgres
brew install mysql
brew unlink mysql
brew install mysql-connector-c
sed -i -e 's/libs="$libs -l "/libs="$libs -lmysqlclient -lssl -lcrypto"/g' /usr/local/bin/mysql_config
pip install MySQL-python
brew unlink mysql-connector-c
brew link --overwrite mysql
set nocp
set nocompatible
set nu
syntax enable
set autoindent
set expandtab
set tabstop=4
set shiftwidth=4
set list
set list listchars=
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_project.settings")
import django
django.setup()
CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" UWSGI_PROFILE_OVERRIDE=ssl=true pip install mysqlclient