Skip to content

Instantly share code, notes, and snippets.

View fukawi2's full-sized avatar

Phillip Smith fukawi2

View GitHub Profile
@fukawi2
fukawi2 / exifpic.pl
Created February 18, 2013 03:36 — forked from pjf/exifpic.pl
# /usr/bin/perl -w
use 5.010;
use strict;
use warnings;
use threads;
use Thread::Queue;
use autodie qw(:all);
use Image::ExifTool qw(ImageInfo);
use Data::Dumper;
use Imager;
@fukawi2
fukawi2 / keybase.md
Created September 18, 2014 23:53
keybase.md

Keybase proof

I hereby claim:

  • I am fukawi2 on github.
  • I am fukawi2 (https://keybase.io/fukawi2) on keybase.
  • I have a public key whose fingerprint is 6050 71EC A86C 954B 8665 85C0 567A 6F39 6F2C FC03

To claim this, I am signing this object:

@fukawi2
fukawi2 / ghost-test.yml
Created January 28, 2015 00:54
Ansible playbook to test for CVE-2015-0235 ("Ghost")
- hosts: all
sudo: yes
tasks:
- name: copy code
copy: src=ghost.c dest=/tmp/ghost.c mode=400
# obtain above code from https://gist.github.com/koelling/ef9b2b9d0be6d6dbab63
- name: compile code
command: chdir=/tmp
gcc -o ghost-test ghost.c
@fukawi2
fukawi2 / gist:329aa44e9a6486f0f739
Created March 2, 2015 01:12
low-mem vps swapfile
swapfile=/swapfile.0
fallocate -l 1G $swapfile
chmod 600 $swapfile
mkswap $swapfile
swapon $swapfile
echo "$swapfile none swap sw 0 0" >> /etc/fstab
sysctl vm.swappiness=10
echo vm.swappiness=10 > /etc/sysctl.d/swappiness
@fukawi2
fukawi2 / ipcnt
Last active October 7, 2015 01:05
ipcnt
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2015 Phillip Smith
#
# 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
@fukawi2
fukawi2 / monitor-mdadm.sh
Created October 7, 2015 00:48
Monitor mdadm array on desktop PC
#!/bin/bash
set -e
set -u
declare -r ARRAY_DEV="${1-}"
if [[ -z "$ARRAY_DEV" ]] ; then
zenity --info --text "Usage: $0 [array_device]"
exit -1
fi
@fukawi2
fukawi2 / gist:3e6fcc398249a34a5c52a90dc9bfcd17
Last active September 14, 2018 05:07 — forked from natsu90/gist:6787b254929355c34e63
Installing PDO Informix
1. Installing Informix Client SDK for Linux x86_64
1.1 Download Informix Client SDK 3.70 for Linux x86_64 from IBM website, https://www-01.ibm.com/marketing/iwm/tnd/search.jsp?rs=ifxdl
1.2 Extract the file, `tar -xvf clientsdk.3.70.FC8DE.LINUX.tar`
1.3 Start installation, `./installclientsdk`, install all to `/opt/infomrix`
2. Installing PDO Informix
@fukawi2
fukawi2 / mirrors.yml
Last active August 2, 2017 03:52
Mirror Guidelines
# Solus Mirror Network
To help distribute software to our users, Solus relies on a network of volunteer mirror servers to host our respoitories. Mirrors can be accessed directly by end-users, however by default Solus downloads from our official Tier 1 mirror, which will then redirect the client to a Tier 2 in our network for that user. This assists with load-balancing our clients across our mirror network based on various metrics such as geographic location, bandwidth, and sync status of each server, and also ensures end-users do not suffer from out-of-date mirrors.
This document is aimed at system administrators who wish to contribute a server to this network.
To contact the Solus mirror admin team, send a mail to mirrors@solus-project.com.
## Tier 2 Mirrors
@fukawi2
fukawi2 / gpg.pub
Created January 29, 2018 22:16
fukawi2
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Keybase OpenPGP v1.0.5
Comment: https://keybase.io/crypto
xsFNBFQbb9YBEACcM/vRnxm/2Jin9NQ+sWx8ehMrHCMKpQgCIOXfhBHSiqX9J64e
6yHOdxdAyEqMNyvgcYIa/fMk7501JB0FFN2APfUJlupwexXCr5T0zZzr6OvTRLxK
/zJwRizQ6KtUqng/0/rtIBqBpt5PVVeQD6G0eD3tDZEmthF0i1y79IdeQwyBp1bt
hugMMM3AoLCuGbxPckQpi71RGmR0Xq7MpercVx1davP8XqkeRJQAkI2e2LfLpRU3
04Wov8DE2BWoOMNTk8BS/p+M32ctXo7pj55SUTtZa4DeA47YhLblDmyDSOclD4gc
hUhbPOKM2cgmlD0bjeWDFrGuNswva89coafzoMnkO0zNjWOSoBxzbmLQUE7m3wgu
@fukawi2
fukawi2 / unifi-video.xml
Created September 14, 2018 02:51
firewalld service file for Unifi Video NVR Software. Save to /etc/firewalld/services/
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Unifi Video NVR Daemon</short>
<description>The Unifi Video NVR manages Unifi Video Cameras configuration and video recording.</description>
# Port List Source: https://help.ubnt.com/hc/en-us/articles/217875218-UniFi-Video-Ports-Used
<port protocol="tcp" port="6666"/> <!-- Inbound Camera Streams -->
<port protocol="tcp" port="7080"/> <!-- HTTP Web UI & API -->
<port protocol="tcp" port="7442"/> <!-- Camera Management -->
<port protocol="tcp" port="7443"/> <!-- HTTPS Web UI & API -->
<port protocol="tcp" port="7445"/> <!-- Video over HTTP -->