Skip to content

Instantly share code, notes, and snippets.

porjo /
Last active Feb 6, 2020
how to install phpredis on Centos6 using pecl

How to install phpredis extension on Centos6 using pecl:

# Enable EPEL repository
yum install epel-release

# Install Autoconf v2.68
yum install autoconf268

# Install the extension
porjo /
Last active Jan 14, 2020
Install Citrix ICA client on Fedora

Running Citrix ICA client on Fedora

  • Download 'Receiver for Linux Web client (x86_64)' from Citrix website
  • Install package e.g.dnf install ICAClientWeb-rhel-
  • Install dependencies (not sure if all these are required):
sudo dnf install compat-openssl10 motif libXaw libidn1.34 libjpeg-turbo-utils
  • Modify launcher /usr/share/applications/wfica.desktop:
porjo /
Created Dec 6, 2019
Given a list of IP addresses (in file 'ips') find what the SSL CN (subject) is for each one.
# Given a list of IP addresses (in file 'ips') find what the SSL CN (subject) is for each one.
echo -en "IP\tSSL CN\n"
for i in `cat ips`; do
echo -en "$i\t"
out=`timeout 2 bash -c "openssl s_client -showcerts -connect $i:443 < /dev/null 2> /dev/null | openssl x509 -noout -subject 2> /dev/null | grep 'subject=' | sed -rn 's/.*CN=([^ /]+).*/\1/p'"`
if [ $? -eq 124 ]; then
echo "(timeout)"
porjo / aws_sign_v4.php
Created Apr 16, 2019
PHP function to generate curl headers suitable for signed requests agains AWS API
View aws_sign_v4.php
// Sign the request and return header array for use by curl
// For HTTP methods with no payload (GET,DELETE) leave $Payload , $ContentType empty
// Based on:
private function SignRequest($Method, $URL, $Payload='', $ContentType='')
if(!defined('AWS_ACCESS_KEY_ID') || !defined('AWS_SECRET_ACCESS_KEY') || !defined('AWS_REGION'))
return null;
porjo / random_ip.go
Created Feb 11, 2019
Generate random IPs with Go
View random_ip.go
package main
import (
func main() {
porjo /
Created Dec 24, 2018
Argos / Bitbar shell script for fetching Exetel usage stats
#!/usr/bin/env bash
echo "Exetel"
echo "---"
porjo /
Last active Nov 13, 2018
Compare AWS ELB response times
# compare AWS ELB: CLB (classic) and ALB (application) response times
# all output times are in seconds
porjo /
Last active May 28, 2021
Use Pulseaudio to stream audio file to network via RTP

RTP Server


pacmd load-module module-null-sink sink_name=rtp format=s16le channels=1 rate=16000
pacmd load-module module-rtp-send source=rtp.monitor

This sets up a multicast socket for RTP streams. When I tested this was

porjo / httpGetMux.go
Last active Aug 4, 2018
GET a HTTP resource using multiple goroutines and mux the result into an output file
View httpGetMux.go
package main
import (
porjo / retext.css
Last active Aug 13, 2018 — forked from elclanrs/retext.css
Markdown theme for ReText
View retext.css
body {
color: #333;
font-family: Arial, sans-serif;
max-width: 7.5in;
margin: 0 auto;
a:link, a:visited {
color: #1B70D1;
text-decoration: none;