Skip to content

Instantly share code, notes, and snippets.

View mikepruett3's full-sized avatar

Mike Pruett mikepruett3

View GitHub Profile
@fnichol
fnichol / README.md
Created March 12, 2011 20:52
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@azam
azam / svg2ico.sh
Last active September 23, 2025 17:33
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico
@rkeithhill
rkeithhill / powershell.json
Last active March 20, 2025 09:49
PowerShell snippets file for Visual Studio Code - place in your ~\AppData\Roaming\Code\User\Snippets directory
{
"Condition statement": {
"prefix": "cond",
"body": [
"$1 { $0; break }"
],
"description": "Switch condition statement"
},
"Condition single quoted string statement": {
"prefix": "condsqstr",
@aspyatkin
aspyatkin / ruby-2.3.0-cygwin-x64.md
Last active March 5, 2019 01:02
Ruby 2.3.0 on Cygwin x64

Installing Ruby 2.3.0 on Cygwin x64

Warning!

You won't get a fully-functional installation! At the time of writing, it turned out gem is kind of broken on Ruby 2.3.0. Ruby gem installation fails with an error like kernel_require.rb:54:in require': cannot load such file -- win32/resolv`.

Prerequisites

Installation

Install essential packages

@digitaldelirium
digitaldelirium / win_tfsbuild.ps1
Created August 2, 2016 21:53
Windows TFS Ansible Module
#!powershell
#
#
# Author: Ian Cornett
# Version: 0.1
# Version History:
#
# Purpose: Queue TFS Build from Ansible and return workable JSON dictionary for polling
#
#
@alex-red
alex-red / blacklist.sh
Last active June 6, 2024 11:17
Geo-IP Block for Edgerouter
#Backup previous list
rm -f BLACKLIST_OLD.txt
mv BLACKLIST.txt BLACKLIST_OLD.txt
touch BLACKLIST.txt
#Download the file from PGL.YOYO
curl -O http://pgl.yoyo.org/as/iplist.php
#Download the file from emerging threats
curl -O http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt
#Download the first file from SpamHaus
curl -O http://www.spamhaus.org/drop/drop.txt
@AfroThundr3007730
AfroThundr3007730 / sysprep_linux.sh
Last active September 5, 2025 13:41
Cloning preparation script for linux systems.
#!/bin/bash
# Does the equivalent of sysprep for linux boxes to prepare them for cloning.
# SPDX-License-Identifier: GPL-3.0-or-later
# For issues or updated versions of this script, browse to the following URL:
# https://gist.github.com/AfroThundr3007730/ff5229c5b1f9a018091b14ceac95aa55
set -euo pipefail
shopt -s extdebug nullglob
@AdamNaj
AdamNaj / about.md
Last active March 12, 2025 21:47
Z Wave Graph for Home Assistant
@rikka0w0
rikka0w0 / pxe_tftp_openwrt.md
Last active October 21, 2025 23:12
PXE on OpenWrt with a different TFTP server

In this configuration, DHCP will run on the OpenWrt Box, while the TFTP server (the one serves the boot files) runs on a different computer.

1. Add to /etc/config/dhcp on OpenWrt Box

config boot linux
        option filename 'pxelinux.0'
        option serveraddress '192.168.?.?'
        option servername '?'
@altryne
altryne / Badges color change config.yaml
Last active February 22, 2021 01:00
Sharing some home assistant settings, if you're interested in my setup, see kit.co/altryne
badges:
- entity: person.alex
style:
ha-state-label-badge:
$:
ha-label-badge:
$: |
.label-badge .label span{
color: #000 !important;
}