Skip to content

Instantly share code, notes, and snippets.

View hsitter's full-sized avatar
🦖

Harald Sitter hsitter

🦖
  • KDE
  • Austria
View GitHub Profile
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# Copyright (C) 2016 Harald Sitter <sitter@kde.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) version 3, or any
# later version accepted by the membership of KDE e.V. (or its
diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
index b6fd7b5..d571c9a 100755
--- a/kcm/kcm.cpp
+++ b/kcm/kcm.cpp
@@ -31,7 +31,8 @@
//#include <KDE/KAboutData>
#include <kauthaction.h>
#include <KF5/KAuth/KAuthActionReply>
-#include <kaoutdata.h>
+#include <KF5/KAuth/KAuthExecuteJob>
@hsitter
hsitter / gist:b0b4d00a23c764944457
Created January 26, 2016 08:50
jenkins apache proxy config
<VirtualHost xxx:80>
ServerName xxx
ServerAlias xxx
# Pass /static/ through apache itself into the relevant dirs.
ProxyPassMatch ^/static/[0-9a-fA-F]{8}\/(.*)$ !
AliasMatch ^/static/[0-9a-fA-F]{8}\/plugin\/(.*)$ /var/lib/jenkins/plugins/$1
<Directory "/var/lib/jenkins/plugins">
Options FollowSymLinks
AllowOverride None
@hsitter
hsitter / meeting.rb
Last active December 1, 2015 14:28
rbot plugin for meeting roll calls
# Meeting Plugin
class MeetingPlugin < Plugin
def help(_, _)
':meeting roll call => highlight everyone and the kitchen sink'
end
def roll_call(m, _)
nicks = m.channel.users.collect(&:nick)
nicks.reject! { |n| n == bot.nick }
m.reply("Roll Call! #{nicks.join(', ')}")
@hsitter
hsitter / sat.rb
Last active October 14, 2015 10:33
# Build-Depends
# Build-Depends-Indep indep is for arch:all packages only https://wiki.debian.org/Build-Depends-Indep
# Build-Conflicts
# Build-Conflicts-Indep
# dep format https://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps
require 'test/unit'
class Version
#!/usr/bin/env ruby
#
# Copyright 2015 Harald Sitter <sitter@kde.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License or (at your option) version 3 or any later version
# accepted by the membership of KDE e.V. (or its successor approved
# by the membership of KDE e.V.), which shall act as a proxy
@hsitter
hsitter / sequencer.rb
Created March 7, 2015 14:02
sequencer
#!/home/me/.rvm/rubies/ruby-2.2.0/bin/rake -f
require 'logger'
require 'logger/colors'
module FileUtils
alias_method :orig_sh, :sh
def osh(*cmd, &block)
bin = [*cmd].first
@hsitter
hsitter / kubuntu-apps-15.04.md
Last active August 29, 2015 14:16
Kubuntu Applications 15.04

15.04

Integrating

  • kaccounts-integration
  • kaccounts-providers
  • signon-kwallet-extension
  • granatier
  • kdenlive
  • katomic
#!/usr/bin/env ruby
require 'ostruct'
require 'optparse'
options = OpenStruct.new
OptionParser.new do |opts|
opts.banner = "Usage: #{opts.program_name} [options]"
opts.on('-v VERSION', '--version VERSION',
<% case upstream_scm.type
when 'git' %>
<%= render("jenkins-templates/upstream-scms/git.xml.erb") %>
<% when 'svn' %>
<%= render("jenkins-templates/upstream-scms/svn.xml.erb") %>
<% else %>
<% raise "Unknown upstream_scm type encountered '#{upstream_scm.type}'" %>
<% end %>