Skip to content

Instantly share code, notes, and snippets.

View VerosK's full-sized avatar
🚌
On the road.

Věroš Kaplan VerosK

🚌
On the road.
View GitHub Profile
@VerosK
VerosK / vtip.md
Created December 14, 2013 22:56
Na počiatku bol plán, a potom bola špecifikácia.

Na počiatku bol plán, a potom bola špecifikácia; A plán bol beztvárny a špecifikácia bola prázdna. A tma bola na tvárach implementátorov.

I prevraveli k svojmu vodcovi, hovoriac: "Je to kopa sračiek a smrdí to ako žumpa."

A ich vodca sa zľutoval nad nimi a prehovoril k vedúcemu projektu: "Je to kopa výkalov, a nikto neznesie jej pach."

A vedúci projektu prehovoril k vedúcemu skupiny, hovoriac: "Je to kontainer exkrementov, a je to veľmi silné, takže to nikto nemôže zniesť."

@haf
haf / gist:8378818
Last active August 11, 2016 20:06
Windows EventLog logstash config
# filter handled by puppet
filter {
# actually EventTime matches: \d{4}\-\d{2}-\d{2} \d{2}\:\d{2}\:\d{2}
if [type] == "eventlog"
and [EventTime] =~ ".*"
and [Message] !~ "Session_Citrix Xen" {
mutate {
# Lowercase some values that are always in uppercase
@ubergarm
ubergarm / do-docker-0.90.md
Created March 21, 2014 20:21
DigitalOcean Docker 0.90 w/ cgroups and memory limits working.

DigitalOcean Latest Docker

Spin up a new droplet using stock Ubuntu 12.04.3 LTS

Rough Guide that would make a nice Ansible role:

# update kernel saucy 3.11.0-18-generic
$ apt-get update

$ apt-get purge linux-image-*

@nrvale0
nrvale0 / gist:9939664
Last active October 15, 2015 19:25
Example of Puppet Collector to avoid using Stages for prep of Yum repo
# Example of using Collector to avoid having to do
# clever things with Puppet Stages.
yumrepo { 'epel':
...
}
# For all Package resources in the catalog, append
# the EPEL repo to the require metaparameter thus
# ensuring that the EPEL yumrepo has been configured
@thomasmb
thomasmb / mysql_pwd_reset.sh
Created August 12, 2014 20:55
A shell script for resetting the root MySQL password
# Please confirm that you want to reset the MySQL passwords
CONFIRM="n"
echo -n "Please confirm MySQL password reset. Continue? (y/N): "
read -n 1 CONFIRM_INPUT
if [ -n "$CONFIRM_INPUT" ]; then
CONFIRM=$CONFIRM_INPUT
fi
echo
@abrahamrhoffman
abrahamrhoffman / centos7ksiso.md
Last active March 11, 2022 22:39
CentOS 7 Kickstart File & How to build an (auto install) ISO

CentOS 7 Kickstart File - HOWTO Build ISO

There is so much documentation online from RedHat and CentOS about this topic - it's sad that I am writing this. But the real state of documentation on this topic (CentOS 7 + KS + ISO = Bootable DVD) is almost non-existent.

I found this: http://smorgasbork.com/component/content/article/35-linux/151-building-a-custom-centos-7-kickstart-disc-part-1

Which I greatly appreciate and +1, but the documentation is half-baked and there are numerous errors.

Finally... FINALLY! After four days of banging my head, I got this to work. Hopefully someone else will be able to do this in a few hours, instead of blowing their weekend like me. :(

@lazyfrosch
lazyfrosch / gist:51299c416656fe76209f
Created January 5, 2015 13:40
Icinga 2 Command Endpoint example
template Host "generic-agent" {
import "generic-host"
object Endpoint __name {
host = "$host.address$"
}
object Zone __name {
parent = "master"
endpoints = [ __name ]
@imranity
imranity / groovy-create-user.md
Last active April 10, 2024 17:29
Jenkins Groovy enable security and create a user in groovy script

This is a snippet that will create a new user in jenkins and if security has been disabled , it will enable it :)

import jenkins.model.*
import hudson.security.*

def instance = Jenkins.getInstance()

def hudsonRealm = new HudsonPrivateSecurityRealm(false)
hudsonRealm.createAccount("MyUSERNAME","MyPASSWORD")
instance.setSecurityRealm(hudsonRealm)
@halberom
halberom / 00_description
Last active April 14, 2022 19:23
ansible - example of using filters to change each item in a list
The problem:
I wanted to use the jinja 'map' filter to modify each item in a string, in this simple
example, adding '.conf' to each item.
The 'format' filter in jinja takes arguments (value, *args, **kwargs). Unfortunately,
it uses 'value' as the pattern. When called inside map 'value' is the current item in
the list, or in other words *args as far as format is concerned. So it's the wrong way
around.
@VerosK
VerosK / parse-json.logstash.conf
Created May 28, 2015 11:19
Logstash - parse JSON
filter {
# if it looks like json, tag it
if [type] == 'syslog' and [message] =~ '{.*}' {
json {
source => 'message'
target => 'json_data'
add_tag => ['has_json']
}
}