Skip to content

Instantly share code, notes, and snippets.

@sperlic
sperlic / rpm-digital-signature.sh
Created Oct 23, 2019 — forked from fernandoaleman/rpm-digital-signature.sh
How to sign your custom RPM package with GPG key
View rpm-digital-signature.sh
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
View athens-radio.m3u
#EXTM3U
#EXTINF:0,089.80 | Dromos, Athens (Greek Mainstream) - DROMOS FM
http://dromos898.live24.gr/dromos898
#EXTINF:0,102.20 | Sfera, Athens (Greek Mainstream) - www.sfera.gr
http://sfera.live24.gr/sfera4132
#EXTINF:0,092.30 | Lampsi, Athens (Greek Mainstream) - Lampsi 92.3
http://lampsifmlive.mdc.akamaized.net/strmLampsi/userLampsi/playlist.m3u8
#EXTINF:0,094.90 | Rythmos, Athens (Greek Mainstream) - Rythmos 94.9
http://ample-05.radiojar.com/g4tyehk5yvduv
#EXTINF:0,104.00 | Party, Athens (Mainstream Pop, Top Hits) - This is my server name
@sperlic
sperlic / wildcard-ssl-cert-for-testing-nginx-conf.md
Created Feb 19, 2018 — forked from sr75/wildcard-ssl-cert-for-testing-nginx-conf.md
create a self signed wildcard ssl cert for testing with nginx.conf example
View wildcard-ssl-cert-for-testing-nginx-conf.md

just change out app_name for your purposes

openssl genrsa 2048 > app_name-wildcard.key

openssl req -new -x509 -nodes -sha1 -days 3650 -key app_name-wildcard.key > app_name-wildcard.cert

# Common Name (eg, your name or your server's hostname) []:*.app_name.com

openssl x509 -noout -fingerprint -text < app_name-wildcard.cert > app_name-wildcard.info
@sperlic
sperlic / run-sonar.sh
Created Mar 19, 2017 — forked from hrskrs/run-sonar.sh
SonarQube analysis runner shell script
View run-sonar.sh
#!/bin/bash
## INSTALLATION: script to copy in your Xcode project in the same directory as the .xcodeproj file
## USAGE: ./run-sonar.sh
## DEBUG: ./run-sonar.sh -v
## WARNING: edit your project parameters in sonar-project.properties rather than modifying this script
#
trap "echo 'Script interrupted by Ctrl+C'; stopProgress; exit 1" SIGHUP SIGINT SIGTERM
function startProgress() {
@sperlic
sperlic / ansible_conditionals_examples.yaml
Created Jan 21, 2017 — forked from marcusphi/ansible_conditionals_examples.yaml
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
View ansible_conditionals_examples.yaml
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files:
View gist:824fdfefd3cb85359d908ac2de98ec15
i php7.0 - server-side, HTML-embedded scripting language (metapackage)
c php7.0-apcu - APC User Cache for PHP
c php7.0-apcu-bc - APCu Backwards Compatibility Module
p php7.0-bz2 - bzip2 module for PHP
p php7.0-cgi
View gist:ede2e0f9177f5f550e20b9154c0c45d3
Formatiranje
Nemojte koristiti YAML karakter > koji najavljuje prelamenje reda
neispravno_formatiran.yml
- file: >
dest='{{ foo_path }}'
src='foo.txt'
mode=0077
state=present
View openstack-cluster
Cluster name: openstack-cluster
Last updated: Fri Jun 12 09:44:46 2015
Last change: Fri Jun 12 09:37:31 2015
Stack: corosync
Current DC: compute1 (2) - partition with quorum
Version: 1.1.12-a14efad
2 Nodes configured
57 Resources configured
View abuse.lua
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
require "math"
require "string"
local alert = require "alert"
local message_variable = read_config("message_variable") or error("must specify a 'message_variable'")
local max_items = read_config("max_items") or 25000