Skip to content

Instantly share code, notes, and snippets.

@sperlic
sperlic / rpm-digital-signature.sh
Created October 23, 2019 17:52 — forked from fernandoaleman/rpm-digital-signature.sh
How to sign your custom RPM package with GPG key
# 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:
@sperlic
sperlic / athens-radio.m3u
Created June 6, 2018 09:43 — forked from dennmtr/athens-radio.m3u
Athens Radio
#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 February 19, 2018 22:36 — forked from sr75/wildcard-ssl-cert-for-testing-nginx-conf.md
create a self signed wildcard ssl cert for testing with nginx.conf example

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 March 19, 2017 01:48 — forked from hrskrs/run-sonar.sh
SonarQube analysis runner shell script
#!/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 January 21, 2017 04:17 — 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 …
---
# 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:
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
Formatiranje
Nemojte koristiti YAML karakter > koji najavljuje prelamenje reda
neispravno_formatiran.yml
- file: >
dest='{{ foo_path }}'
src='foo.txt'
mode=0077
state=present
- debug:
msg: '{{ dirvish_conf_options.bank }}'
@sperlic
sperlic / fabfile.py
Created May 13, 2012 10:01 — forked from whiteinge/fabfile.py
Example fabric script with VirtualBox automation
# -*- coding: utf-8 -*-
"""MyCompany Fabric script.
* Deploy code
* Set up a local development environment
There are two ways to deploy the myrepo code:
1. :func:`deploy` will do a full virtualenv installation/update and expand a
tarball of the specified git revision (defaults to HEAD) to a timestamped
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal