Skip to content

Instantly share code, notes, and snippets.

View israelshirk's full-sized avatar

Israel israelshirk

View GitHub Profile
@israelshirk
israelshirk / devicetree.txt
Created November 18, 2017 20:18
Raspberry PI 3B Device Tree with Navio2 installed
/dts-v1/;
/ {
compatible = "brcm,bcm2837", "brcm,bcm2836";
serial-number = "00000000aa057067";
model = "Raspberry Pi 3 Model B Rev 1.2";
memreserve = <0x37000000 0x8000000>;
interrupt-parent = <0x1>;
#address-cells = <0x1>;
#size-cells = <0x1>;
@israelshirk
israelshirk / navio2-atoms.txt
Created November 18, 2017 20:17
Navio2 EEProm Atoms
# Start of atom #0 of type 0x0001 and length 45
# Vendor info
product_uuid 0f8b16e6-51d2-4125-ae44-ae21f0e0c9db
product_id 0x0003
product_ver 0x0001
vendor "Emlid Limited " # length=14
product "Navio 2" # length=7
# End of atom. CRC16=0x4b62
@israelshirk
israelshirk / LICENSE.txt
Created September 5, 2017 15:41
Modified version of jaybaird/python-bloomfilter to use mmh3 instead of more expensive cryptographic one-way functions.
Copyright (c) <2011> <Jay Baird and Bob Ippolito>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
@israelshirk
israelshirk / copy-and-format-ext4-xfs-gce-disks.sh
Created August 31, 2017 20:51
Snippets for copying and formatting GCE disks to and from XFS.
for disk in gitlab-data postgresql-data redis-data redis-disk sentry-data gke-core-b414f88f-dyna-pvc-444be9f4-5d32-11e7-97ab-42010a8a012e gke-core-b414f88f-dyna-pvc-8e70f528-4bc2-11e7-97ab-42010a8a012e; do
gcloud compute disks snapshot "$disk" --snapshot-names "$disk" --zone=us-west1-a
done
for disk in gitlab-data postgresql-data redis-data redis-disk sentry-data gke-core-b414f88f-dyna-pvc-444be9f4-5d32-11e7-97ab-42010a8a012e gke-core-b414f88f-dyna-pvc-8e70f528-4bc2-11e7-97ab-42010a8a012e; do
gcloud compute disks create $(echo $disk | sed "s/^.../old/") --source-snapshot=$disk --zone=us-west1-a
done
for disk in gitlab-data postgresql-data redis-data redis-disk sentry-data gke-core-b414f88f-dyna-pvc-444be9f4-5d32-11e7-97ab-42010a8a012e gke-core-b414f88f-dyna-pvc-8e70f528-4bc2-11e7-97ab-42010a8a012e; do
gcloud compute disks delete "$disk" --zone=us-west1-a
@israelshirk
israelshirk / har-schema.json
Created May 10, 2017 22:11
HAR JSON schema. For use with my branch of tv4.
{
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
"name": "HAR format",
"description": "JSON Schema structuring of HAR, based on https://github.com/jarib/har/blob/master/schema.json",
"type": "object",
"properties": { "$ref": "#logType" },
"logType": {
"id": "logType",
"description": "HTTP Archive structure.",
"type": "object",
gistup
@israelshirk
israelshirk / .gistup
Created September 10, 2016 05:54
New Description
gistup
@israelshirk
israelshirk / .bash_profile
Last active August 29, 2016 23:50
For Lance - chop off what you don't need
#!/bin/bash
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
@israelshirk
israelshirk / Email.php
Created December 14, 2015 21:00
CodeIgniter 1.7.3 email with fix for mail() security issue in recent php 5.4/5.5/5.6. Also includes basis for unit test framework on CI 1.7.3. There's some stuff you'd need to recreate/adapt for the tests - DI, disabling pieces of the loading process, etc.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html