Skip to content

Instantly share code, notes, and snippets.

@frozenfoxx
frozenfoxx / UnityHttpListener.cs
Created October 5, 2020 22:42 — forked from amimaro/UnityHttpListener.cs
Listen for Http Requests with Unity
using UnityEngine;
using UnityEngine.Networking;
using System;
using System.IO;
using System.Net;
using System.Threading;
public class UnityHttpListener : MonoBehaviour
{
@frozenfoxx
frozenfoxx / db-output.log
Last active September 29, 2017 21:11
Development for the docker-schemaverse container
devbox:docker-schemaverse frozenfoxx$ docker run -it -p 5432:5432 frozenfoxx/docker-schemaverse:latest
* Starting PostgreSQL 9.5 database server [ OK ]
2017-09-29 15:44:51 UTC [37-2] LOG: received fast shutdown request
2017-09-29 15:44:51 UTC [37-3] LOG: aborting any active transactions
2017-09-29 15:44:51 UTC [42-2] LOG: autovacuum launcher shutting down
2017-09-29 15:44:51 UTC [39-1] LOG: shutting down
2017-09-29 15:44:53 UTC [39-2] LOG: database system is shut down
2017-09-29 16:00:59 UTC [27-1] LOG: database system was shut down at 2017-09-29 15:44:53 UTC
2017-09-29 16:00:59 UTC [27-2] LOG: MultiXact member wraparound protections are now enabled
2017-09-29 16:00:59 UTC [26-1] LOG: database system is ready to accept connections
@frozenfoxx
frozenfoxx / v3.yaml
Last active September 29, 2017 16:02
Hiera v3 to v5
---
:backends:
- yaml
:hierarchy:
- "%{::environment}/nodes/%{::trusted.certname}"
- "%{::environment}/puppetlabs"
- "%{::environment}/management"
- "%{::environment}/hosts"
- "%{::environment}/common"

Keybase proof

I hereby claim:

  • I am frozenfoxx on github.
  • I am frozenfoxx (https://keybase.io/frozenfoxx) on keybase.
  • I have a public key ASAxMh-neQUEJlmvd05wUzf0-gmHj1HD0pkMaYEezTxXYwo

To claim this, I am signing this object:

@frozenfoxx
frozenfoxx / service.pp
Last active February 21, 2017 20:50
PacketFilter Service for OS X
# Ensure PacketFilter is running
service { 'pfctl':
ensure => 'running',
provider => base,
restart => 'pfctl -d && pfctl -F all && pfctl -f /etc/pf.conf && pfctl -e',
start => 'pfctl -f /etc/pf.conf && pfctl -e',
status => "echo \"pfctl -s info 2>/dev/null | grep Status | [ $(awk '{print \$2}') == Enabled ]\" | bash",
stop => 'pfctl -d',
}
@frozenfoxx
frozenfoxx / github-api.py
Created July 20, 2016 16:57 — forked from tianchaijz/github-api.py
A python script to clone a specified github user's repos, gists.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import json
import logging
import requests
import multiprocessing.dummy
@frozenfoxx
frozenfoxx / gist:086c25fd60e80c60225cbb77e078c239
Created May 26, 2016 21:23
puppet variable set on os and version
if $facts['os']['family'] == 'Darwin' {
if versioncmp($facts['os']['macosx']['version']['major'], '10.11') >= 0 {
$var = '/etc/ssh'
} else {
$var = '/etc'
}
} else {
$var = '/etc/ssh'
}
@frozenfoxx
frozenfoxx / modulevariableinterpolation.yml
Last active April 22, 2016 20:46
Interpolating variables within a Puppet YAML Hiera file
somemodule::rubyver: "2.1.1"
somemodule::shellpath: "/Users/buildbot/.rvm/gems/ruby-%{hiera('somemodule::rubyver')}/bin:/Users/buildbot/.rvm/gems/ruby-%{hiera('somemodule::rubyver')}@global/bin:/Users/buildbot/.rvm/rubies/ruby-%{hiera('somemodule::rubyver')}/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/buildbot/.rvm/bin"
# Variables
CERTS=''
PUPPET=/opt/puppetlabs/bin/puppet
CERTFILES=/etc/puppetlabs/puppet/ssl/ca/signed
PREFIX=<%= @prefix %>
# Logic
CERTS=$(${PUPPET} cert list --all | grep -e "^\+\s\"${PREFIX}.*$" | cut -f 2 -d ' ' | sed 's/\"//g')
echo "Found $(echo ${CERTS} | wc -w) ephemeral clone certificates."
@frozenfoxx
frozenfoxx / vmpooler.yaml
Last active January 14, 2016 20:42
vmpooler.yaml
---
:vsphere:
server: '<server IP>'
username: 'root'
password: '<password>'
:redis:
server: 'dns.pool.domain.com'
:graphite: