Skip to content

Instantly share code, notes, and snippets.

View mindjiver's full-sized avatar
🐒
Working from home

Peter Jönsson mindjiver

🐒
Working from home
View GitHub Profile
postfix 14610 1080 0 18:05 ? 00:00:00 pickup -l -t fifo -u
root 14628 582 0 19:44 ? 00:00:00 sshd: root@pts/0
root 14630 14628 0 19:44 pts/0 00:00:00 -bash
root 14643 14630 0 19:44 pts/0 00:00:00 ps -fA
root 16307 1 0 2013 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 16309 16307 0 2013 ? 00:01:29 nginx: worker process
root 19000 601 0 Feb01 ? 00:00:00 CROND
root 19001 19000 0 Feb01 ? 00:00:00 /bin/bash -c /bin/sleep 150; /usr/bin/chef-client &> /dev/null
root 19014 19001 0 Feb01 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client
root 19019 19014 0 Feb01 ? 00:00:00 chef-client worker: ppid=19014;start=20:02:32;
@mindjiver
mindjiver / scm.py.patch
Created February 17, 2014 10:09
Quick fix to include vcs-information in generated tarball
--- /tmp/scm.py 2014-02-17 11:08:18.730335514 +0100
+++ /usr/lib/python2.6/site-packages/mockbuild/scm.py 2014-02-17 11:07:56.501196444 +0100
@@ -151,9 +151,9 @@
tarball = tardir + ".tar.gz"
taropts = ""
- proc = subprocess.Popen(['tar', '--help'], shell=False, stdout=subprocess.PIPE)
- if "--exclude-vcs" in proc.communicate()[0]:
- taropts = "--exclude-vcs"
# next four lines substituted by autoconf
%define major 1
%define minor 1
%define sub 32
%define extralevel %{nil}
%define release_name mock
%define release_version %{major}.%{minor}.%{sub}%{extralevel}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
[stash@stash-prod-app1 792]$ git fsck
error: unable to unpack 1e359384837decb8ab7b5afb2784e19297e00184 header
error: inflateEnd: stream consistency error (no message)
fatal: loose object 1e359384837decb8ab7b5afb2784e19297e00184 (stored in ./objects/1e/359384837decb8ab7b5afb2784e19297e00184) is corrupt
@mindjiver
mindjiver / openstack.txt
Created June 26, 2014 22:58
Openstack contribution
Dear Peter Jönsson,
Thank you for contributing to OpenStack. We hope you will be able to join
us in Paris for the next Design Summit, Nov 3-7, 2014. The main
conference will run Monday - Wednesday and the Design Summit will run
Tuesday - Friday. View this image for reference:
https://www.openstack.org/themes/openstack/images/conferences/paris/details-chart.png
We're providing all ATCs who contributed to the Icehouse release or
Juno release (prior to Aug 21, 2014) with a *600 USD discount*
@mindjiver
mindjiver / ohai_cloudstack.rb
Created July 3, 2014 09:40
ohai_cloudstack.rb
#
# Author:: Peter Joensson (<peter.jonsson@klarna.com>)
# Copyright:: Copyright (c) 2014 Peter Joensson
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@mindjiver
mindjiver / readlink_osx.sh
Created August 6, 2014 12:37
readlink on osx
@mindjiver
mindjiver / erlang_version.sh
Last active August 29, 2015 14:07
Show Erlang version
#!/bin/bash
erlang_version=$(erl -eval 'erlang:display(erlang:system_info(system_version)), halt().' -noshell |
sed -e 's@"@@g' | sed -e 's@\\n@@g')
echo "$erlang_version"
@mindjiver
mindjiver / logstash.conf
Created May 11, 2015 07:16
logstash rotation config
/var/log/logstash/*.log {
daily
rotate 7
copytruncate
compress
missingok
notifempty
}
@mindjiver
mindjiver / u-boot.lds
Created February 13, 2011 21:10
lds-file for mini2440
/*
* (C) Copyright 2002
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or