Skip to content

Instantly share code, notes, and snippets.

View rubyjedi's full-sized avatar

Laurence A. Lee rubyjedi

View GitHub Profile
@rubyjedi
rubyjedi / xvfb-run.sh
Created June 10, 2020 22:24 — forked from tyleramos/xvfb-run.sh
XVFB Run Bash script
#!/bin/sh
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done. The return
# value of the command becomes the return value of this script, except in cases
# where this script encounters an error.
#
# If anyone is using this to build a Debian package, make sure the package
@rubyjedi
rubyjedi / syncro-install.ps1
Created January 18, 2020 04:16 — forked from theinventor/syncro-install.ps1
Download Syncro agent and install it from command line
# Download the installer
$source = "https://rmm.syncromsp.com/GetThisURLfromYourCustomerDetailPageAndPutItHere.exe"
$destination = "C:\temp\syncro-installer.exe"
# Check if Invoke-Webrequest exists otherwise execute WebClient
if (Get-Command 'Invoke-Webrequest'){
Invoke-WebRequest $source -OutFile $destination
} else {
$WebClient = New-Object System.Net.WebClient
@rubyjedi
rubyjedi / transform-leases.pl
Created September 7, 2019 16:53 — forked from sykesm/transform-leases.pl
Transform dnsmasq leases to ISC lease file format.
#!/usr/bin/perl
use NetAddr::IP;
use POSIX qw(strftime);
my $dnsmasq_leases_path = '/var/run/dnsmasq-dhcp.leases';
my $dhcpd_leases_path = '/var/run/dhcpd.leases';
my $network_names_path = '/opt/vyatta/config/active/service/dhcp-server/shared-network-name';
my %networks_by_subnet;
@rubyjedi
rubyjedi / Ansible-Vault how-to.md
Created June 5, 2019 21:27 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@rubyjedi
rubyjedi / pit-scfg.txt
Created December 8, 2018 08:10 — forked from mbutler/pit-scfg.txt
the pit 4.17 syncronet scfg door settings
====== The Pit ======
===== SCFG Settings =====
Name The Pit
Internal Code PIT
Start-up Directory ../xtrn/pit4
Command Line runpit %#
Clean-up Command Line
Execution Cost None
@rubyjedi
rubyjedi / README.md
Created December 6, 2018 00:25 — forked from gbraad/README.md
Running a multi-stage build on Fedora

Running a multi-stage build on Fedora

Running a multi-stage build on Fedora is possible without 'installing' Docker CE

FROM fedora:27 AS base
FROM base AS test
@rubyjedi
rubyjedi / Mobile Checkin Boarding - Privacy Policy.html
Last active February 27, 2018 01:27 — forked from alphamu/Android Privacy Policy Template
Mobile Checkin Boarding - Privacy Policy.html
<html>
<body>
<h2>Privacy Policy</h2>
<p>LALEE CONSULTING LLC built the Mobile Checkin Boarding app as a commercial app. This SERVICE is provided by LALEE CONSULTIG LLC and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding our policies with the collection, use, and
disclosure of Personal Information if anyone decided to use our Service.</p>
<p>If you choose to use our Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that we collect are used for providing and
improving the Service. We will not use or share your information with anyone except as described
@rubyjedi
rubyjedi / .gitignore
Created October 26, 2017 08:52 — forked from uu59/.gitignore
socket.io and Sinatra
vendor/
.bundle/
node_modules/
Gemfile.lock
@rubyjedi
rubyjedi / card-present.md
Created September 16, 2017 04:38
Stripe card-present API

Sending swiped card data to Stripe

Stripe's API supports sending both typed and swiped card data. Typed data is recorded when your customer enters their card details on your site and the data is sent to Stripe either by Stripe.js or through the Stripe API:

https://stripe.com/docs/api#create_charge

Swiped data is sent to Stripe when you have your own card swipe that reads the magnetic card strip on the back of your customers' cards. The raw output of the card swipe can then be submitted to the Stripe API.

The data contained on the magnetic strip of a card contains similar details to those embossed on the card but with some additions and repetitions. Details on the magnetic strip data can be found here:

@rubyjedi
rubyjedi / make-kiosk.sh
Created July 13, 2017 18:42 — forked from voor/make-kiosk.sh
Configuring Kiosk Mode on CentOS
#!/bin/bash
# KIOSK generator for Scientific Linux and CentOS (versions 5; 6 and 7)
# Created using Scientific Linux
# Wasn't made and never tested on different distros than SL/CentOS/EL!
# Version 1.4 for i386 and x86_64
#
# Feel free to contact me: marcin@marcinwilk.eu
# www.marcinwilk.eu
# Marcin Wilk