Skip to content

Instantly share code, notes, and snippets.

View osis's full-sized avatar
👾

Dwayne Forde osis

👾
View GitHub Profile
@osis
osis / Compliance (SOC 2) Git Help
Last active May 8, 2025 14:59
Github PRs with Reviewer information as CSV
git log --since='2025-01-01' --until='2025-12-31' --pretty=format:'"%h","%an","%ae","%ai","%s"' > commits.csv
gh pr list -R <owner>/<repo> --json "number,title,author,reviews,mergeCommit,mergedAt,createdAt,mergedBy" -s "merged" --limit 1000 | \
jq -r '.[] | [.number,.author.name,.createdAt,.mergedAt,[.reviews | map(select(.state | contains("APPROVED")))][0][0].submittedAt,[.reviews | map(select(.state | contains("APPROVED")))][0][0].author.login,.mergeCommit.oid,.mergedBy.name] | @csv'
source ~/.vimrc
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
Plug 'mileszs/ack.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Syntax highlighting
Plug 'dense-analysis/ale'
echo "=== Setting up MySQL ==="
apt-get -qqy update
apt-get install -qqy mysql-server
mysqld --version
service mysql start
mysql -uroot -e "CREATE USER '${DATABASE_USER}'@'localhost' IDENTIFIED BY '${DATABASE_PASSWORD}';"
mysql -uroot -e "GRANT ALL PRIVILEGES ON * . * TO '${DATABASE_USER}'@'localhost';"
mysql -uroot -e "UPDATE mysql.user SET authentication_string=PASSWORD('${DATABASE_PASSWORD}'), plugin='mysql_native_password' WHERE user='${DATABASE_USER}';"
mysql -uroot -e "CREATE DATABASE ${DATABASE_NAME};"
mysql -uroot -e "FLUSH PRIVILEGES;"
@osis
osis / gist:45ab8d56d70c1c2f4465507abe6db97e
Created April 17, 2019 16:07
PHP Composer Installation Script
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "copy('https://composer.github.io/installer.sha384sum', 'composer-setup.sha384sum');"
php -r "if (hash_file('sha384', 'composer-setup.php') === explode(' ', implode('', file('composer-setup.sha384sum')))[0]) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); unlink('composer-setup.sha384sum'); } echo PHP_EOL;"
php composer-setup.php --filename=composer --install-dir=/usr/bin
php -r "unlink('composer-setup.php');"
php -r "unlink('composer-setup.sha384.sum');"
//
// ViewController.swift
//
import UIKit
import SafariServices
class ViewController: UIViewController, NostalgiaCameraDelegate {
@IBOutlet var imgView: UIImageView!
//
// NostalgiaCamera.mm
//
#import <opencv2/opencv.hpp>
#import <opencv2/videoio/cap_ios.h>
#import <opencv2/imgcodecs/ios.h>
#include "NostalgiaCamera.h"
using namespace cv;
//
// NostalgiaCamera.h
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
// Protocol for callback action
@protocol NostalgiaCameraDelegate <NSObject>
@osis
osis / gist:b1c8e56d3ffabcd41a73
Last active August 29, 2015 14:27
Flare.json
{
"name": "metadata",
"children": [
{
"name": "..cf",
"children": [
{
"name": "cloud_controller",
"children": [
{ "name": "system_domain", "size": 3938 },
@osis
osis / load_and_eject
Last active February 13, 2017 19:29
Script to Load Keys and Eject
#!/usr/bin/env bash
HOURS=$1
DIR="`dirname \"$0\"`"
DIR="`cd \"$DIR\" && pwd`"
KEY="$DIR/id_rsa"
if [ -z $HOURS ]; then
CURRENT_HOUR=$(date +"%H")
QUITTING_HOUR=18
#!/bin/bash
iptables --flush
iptables --flush -t nat
export INTERNAL_NETWORK_RANGE=10.0.0.0/8
export GATEWAY_INTERNAL_IP=10.1.0.1
export GATEWAY_EXTERNAL_IP=88.198.252.242
export PIVOTALCF_IP=10.1.0.2
export HA_PROXY_IP=10.0.0.254