Skip to content

Instantly share code, notes, and snippets.

View languitar's full-sized avatar

Johannes Wienke languitar

View GitHub Profile
@ephemient
ephemient / ⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
Last active October 22, 2023 12:14
(Arch Linux) Keep current modules around during kernel upgrade
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
[Action]
Description = Restore Linux kernel modules
When = PostTransaction
Depends = coreutils
Depends = rsync
@igniteflow
igniteflow / mock-object-property.py
Created October 3, 2016 11:03
How to mock an object property in Python
import mock
with mock.patch('path.to.ObjectClass.my_property', new_callable=mock.PropertyMock) as mock_my_property:
mock_my_property.return_value = 'my value'
@rowan-m
rowan-m / gist:1026918
Created June 15, 2011 11:34 — forked from jedi4ever/gist:898114
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself