Skip to content

Instantly share code, notes, and snippets.

View ibejohn818's full-sized avatar

John Hardy ibejohn818

  • GoDaddy Inc
  • Los Angeles, Ca
View GitHub Profile
export PATH="/usr/local/opt/llvm/bin:$PATH"
export CC="/opt/local/bin/clang-mp-10"
export CXX="/opt/local/bin/clang++-mp-10"
export CXX11="/opt/local/bin/clang++-mp-10"
export CXX14="/opt/local/bin/clang++-mp-10"
export CXX17="/opt/local/bin/clang++-mp-10"
export CXX1X="/opt/local/bin/clang++-mp-10"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
docker exec {CONTAINER} killall -USR2 openvpn
docker logs {OPENVPN_CONTAINER}
import express from 'express'
const app = express()
import AWS from 'aws-sdk'
const fs = require('fs')
const path = require('path')
const mtype = require('mime-types')
const BUCKET = "mt-jhardy"
const PORT = 8080
//
// ViewController.swift
// S3Xfer
//
// Created by John Hardy on 11/17/18.
// Copyright © 2018 John Hardy. All rights reserved.
//
import UIKit
import AWSCore
docker run --rm -it -v ${PWD}:/vids google/shaka-packager \
'in=misc1.mp4,stream=audio,init_segment=audio_init.mp4' \
'in=misc1.mp4,stream=video,init_segment=h264_360p_init.mp4' \
--mpd_output h264.mpd \
--base_urls https://example.org/ \
--hls_base_url https://example.org/ \
--generate_static_mpd
@ibejohn818
ibejohn818 / cf_print_ns.py
Last active January 3, 2020 07:14
Cloudformation resource spec json (py3.6)
def test():
from pprint import pprint
from collections import OrderedDict
import zlib
import json
import urllib.request as request
url = 'https://d201a2mn26r7lk.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json'
@ibejohn818
ibejohn818 / 1.download.sh
Last active February 18, 2019 23:17
CIS Level 1 Audit Test
curl -L 'https://gist.github.com/ibejohn818/1c93f895e0247211954266569ea862eb/download' -o gist.zip &&\
unzip gist.zip -d ./ &&\
cp -r 1c93f895e0247211954266569ea862eb-master/* . &&\
make test &&\
rm -rf *;
@ibejohn818
ibejohn818 / disableCoredump.sh
Created February 12, 2019 23:51
Disable coredump on aws linux
#!/bin/bash
# tested on centos 6/7 -JH
# tested on awslinux 1 -JH
echo '* hard core 0' >> /etc/security/limits.conf
echo 'fs.suid_dumpable = 0' >> /etc/sysctl.conf
sysctl -p
@ibejohn818
ibejohn818 / inspect_stacks.py
Last active January 23, 2019 00:53
quick way to load all stack weights
import sys
import os
import inspect
import re
import importlib
from functools import cmp_to_key
import pkgutil
from nimbi.aws import CloudFormationStack
import nimbi
from pprint import pprint
@ibejohn818
ibejohn818 / Install PyQt5 on Ubuntu with python3 .md
Created January 5, 2019 03:25 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal