Skip to content

Instantly share code, notes, and snippets.

View paulczar's full-sized avatar

Paul Czarkowski paulczar

View GitHub Profile
@paulczar
paulczar / gist:5493708
Created May 1, 2013 04:16
Patch to fix libiconv for glibc >= 2.16 - originally found at http://www.itkb.ro/kb/linux/patch-libiconv-pentru-glibc-216
--- srclib/stdio.in.h.orig 2011-08-07 16:42:06.000000000 +0300
+++ srclib/stdio.in.h 2013-01-10 15:53:03.000000000 +0200
@@ -695,7 +695,9 @@
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
@paulczar
paulczar / c:\temp\vmdriverhack.reg
Created December 9, 2012 23:31
registry hack for windows vm migration
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\primary_ide_channel]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\secondary_ide_channel]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"
@paulczar
paulczar / recipe.md
Created May 14, 2019 21:30
beef fat biscuits (brisket biscuit?)

2 cups self raising flour 1/4 cups beef tallow 3/4 cups buttermilk 1/2 tsp salt

12 biscuits per serving

The beef tallow should be solid ... chop it into small cubes and freeze for a few hours.

Throw everything into food processor and pulse until just combined (or use a pastry cutter thingy, but who's got time for that).

Keybase proof

I hereby claim:

  • I am paulczar on github.
  • I am paulczar (https://keybase.io/paulczar) on keybase.
  • I have a public key ASApYOOV5DvOybPeYo1cMk3NQYUvp9GjBcTXAGdl0lZI3Qo

To claim this, I am signing this object:

@paulczar
paulczar / logstash-perf.md
Last active May 14, 2018 03:13
logstash performance deets

Logstash Performance Testing

Server Details

HP BL460

  • 48 Gb Memory
  • 2 x X5675 @ 3.07GHz
  • 2 x 10 gbps NIC
  • 2tb NetApp NFS volume for ES data
variables:
env_vars:
HTTP_PROXY: http://proxy.local:8080
HTTPS_PROXY: http://proxy.local:8080
playbooks:
task:
- name: preflight checks
@paulczar
paulczar / Dockerfile
Created June 14, 2013 03:38
Chef-Zero Docker File
# Chef-Zero
#
# VERSION 0.0.1
FROM base
MAINTAINER Paul Czarkowski "username.taken@gmail.com"
RUN apt-get update
RUN apt-get install -y ruby1.9.1-dev build-essential
@paulczar
paulczar / ghe-authorized-keys
Created December 12, 2016 17:44
SSH authorized via GHE pub keys
#!/usr/bin/python
# set "AuthorizedKeysCommand /usr/local/bin/ghe-authorized-keys" in /etc/ssh/sshd_config
import sys
import requests
from requests.auth import HTTPDigestAuth
import json
@paulczar
paulczar / Vagrantfile
Created November 27, 2013 15:26
add help command for your vagrantfile with this one easy trick
if ARGV[0] == 'help' and ARGV[1] == 'vagrantfile'
puts <<eof
How to use this Vagrantfile:
env['BRANCH'] - set a different branch to clone
eof
ARGV.shift(2)
ARGV.unshift('status')
@paulczar
paulczar / doing_xmas_wrong.md
Created December 25, 2015 23:34
running local registry backed by cloud files on carina
$ for i in 1 2 3; do
  docker run -d \
      --env constraint:node==bf76bea4-47ef-43ac-a7ae-67a6e6db15bd-n$i \
      -p 127.0.0.1:5000:5000 \
      --name registry-$i \
      -e REGISTRY_STORAGE=swift \
      -e REGISTRY_STORAGE_SWIFT_USERNAME=notreallyme \
      -e REGISTRY_STORAGE_SWIFT_PASSWORD=reallyismypasswordtho \
 -e REGISTRY_STORAGE_SWIFT_AUTHURL=https://identity.api.rackspacecloud.com/v2.0/ \