Skip to content

Instantly share code, notes, and snippets.

# Set the basic credencials
#
set imap_user= 'gmailUser@gmail.com'
set imap_pass= 'password'
set hostname = "gmail.com"
set realname = "gmailUser"
# Set GMAIL specific folders likem sent mail, drafts, All mail
set spoolfile = "imaps://imap.gmail.com/INBOX"
set folder = "imaps://imap.gmail.com/"
@jumanjiman
jumanjiman / flexlm
Created October 18, 2011 21:56
init script for flexlm
#!/bin/bash
#
# /etc/rc.d/init.d/flexlm
#
# Manage the Intel license server
#
# chkconfig: 2345 90 10
# description: Start or stop the Intel flex license manager
# There are two daemons: the master and the vendor.
@jumanjiman
jumanjiman / flexlm-server.spec
Created October 29, 2011 19:59
spec file for flex license server
# do nothing instead of strip symbols
%global __strip /bin/true
# do not build debuginfo pkg
%global debug_package %{nil}
Name: flexlm-server
Summary: Intel floating license server
@jumanjiman
jumanjiman / xfce.pp
Created October 30, 2011 16:54
package list to use xfce on fedora
###################################################
# usage:
# include either xfce::enabled or xfce::disabled
# in your node definition
###################################################
class xfce::enabled {
$xfce_version = 'latest'
include xfce
}
@jumanjiman
jumanjiman / intel-license.spec
Created October 30, 2011 18:02
spec file to bundle an intel license file
Name: intel-license
Version: 0.1
Release: 1%{?dist}
Summary: Provides license file for Intel products
Group: System Environment/Base
License: Proprietary
URL: http://jumanjiman.github.com
Source0: %{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@jumanjiman
jumanjiman / boot-time-status.sh
Created November 4, 2011 22:28
kind of like chkconfig --list
#!/bin/bash
for i in /lib/systemd/system/*.service; do
svc=$(basename $i)
systemctl is-enabled $svc &> /dev/null && status=on || status=off
printf "%-50s %9s\n" $svc $status
done
@jumanjiman
jumanjiman / bug27932_mrg1X_rpm_spec.diff
Created January 31, 2012 19:42
Patch for openonload-201109-u1: hard-codes the RPM requirements for kernel-rt-2.6.33.9-rt31.65.el5rt
diff -ru openonload-201109-u1.orig/scripts/onload_misc/openonload.spec openonload-201109-u1/scripts/onload_misc/openonload.spec
--- openonload-201109-u1.orig/scripts/onload_misc/openonload.spec 2011-12-23 13:44:18.000000000 +0000
+++ openonload-201109-u1/scripts/onload_misc/openonload.spec 2012-01-31 18:07:16.359684000 +0000
@@ -119,7 +119,7 @@
BuildRoot : %{_builddir}/%{name}-root
AutoReqProv : no
%if %{redhat}
-BuildRequires : gawk gcc sed make bash kernel%{kvariantsuffix_dash} = %{kverrel}, kernel%{kvariantsuffix_dash}-devel = %{kverrel} glibc-common libpcap-devel
+BuildRequires : gawk gcc sed make bash kernel-x86_64 = 2.6.33.9-rt31.65.el5rt,kernel-rt-devel-x86_64 = 2.6.33.9-rt31.65.el5rt glibc-common libpcap-devel
%else
commit a193d52afe763759595705dd835acd8ce7e398b0
Author: Paul Morgan <jumanjiman@gmail.com>
Date: Tue Jan 31 15:03:08 2012 -0500
update the packageversion
diff --git a/scripts/onload_misc/openonload.spec b/scripts/onload_misc/openonload.spec
index ced6bb9..13bfa30 100644
--- a/scripts/onload_misc/openonload.spec
+++ b/scripts/onload_misc/openonload.spec
@jumanjiman
jumanjiman / yum_package_version.rb
Created February 15, 2012 22:14
generate a facter fact for every package on a host
IO.popen("/bin/rpm -qa --qf='%{name} '").read.split(' ').each do |package|
Facter.add("yum_#{package}_version") do
setcode do
puts IO.popen("/bin/rpm -q --qf=\'%|epoch?{%{epoch}}:{0}|:%{version}-%{release}.%{arch}\' #{package}").read
end
end
end
@jumanjiman
jumanjiman / posterous-octopress.rb
Created March 4, 2012 02:36 — forked from rmurphey/posterous-octopress.rb
Generate Octopress posts from Posterous XML
#!/usr/bin/env ruby
require 'xmlsimple'
require 'active_support/inflector'
require 'yaml'
require 'json'
require 'fileutils'
require 'date'
class Post