Skip to content

Instantly share code, notes, and snippets.

Avatar

Tony Romeo scuderiaf1

View GitHub Profile
@scuderiaf1
scuderiaf1 / prototype-buildpack
Last active Aug 25, 2017
prototype-buildpack
View prototype-buildpack
require "tmpdir"
require "digest/md5"
require "benchmark"
require "rubygems"
require "language_pack"
require "language_pack/base"
require "language_pack/ruby_version"
require "language_pack/helpers/nodebin"
require "language_pack/helpers/node_installer"
require "language_pack/helpers/yarn_installer"
@scuderiaf1
scuderiaf1 / Mac SSH Autocomplete
Created Aug 16, 2016
Add auto complete to your ssh, put into your .bash_profile
View Mac SSH Autocomplete
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@scuderiaf1
scuderiaf1 / Mac SSH Autocomplete
Created Aug 16, 2016 — forked from aliang/Mac SSH Autocomplete
Add auto complete to your ssh, put into your .bash_profile
View Mac SSH Autocomplete
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
View example_playbook
#- name: Installing FFMPEG
- name: Running ./configure for FFMPEG
command: '"{{ item }}" chdir=/myhome/ffmpeg-2.8.2/'
with_items:
- ./configure
- name: Running "make" for FFMPEG
command: '"{{ item }}" chdir=/myhome/ffmpeg-2.8.2/'
with_items:
- make
- name: Running "make install" for FFMPEG
@scuderiaf1
scuderiaf1 / GHOST-test.sh
Last active Sep 17, 2015
GHOST - gethostbyname Detector GHOST-test.sh CVE-2015-0235 <https://access.redhat.com/security/cve/CVE-2015-0235>
View GHOST-test.sh
#!/bin/bash
#Version 3
## command line to run
## curl -L https://gist.githubusercontent.com/scuderiaf1/52f881e6cce407228780/raw/043b6124f75d4c897377c157c6efab53654eb042/GHOST-test.sh |bash
echo "Installed glibc version(s)"
rv=0
for glibc_nvr in $( rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n' glibc ); do
glibc_ver=$( echo "$glibc_nvr" | awk -F- '{ print $2 }' )
glibc_maj=$( echo "$glibc_ver" | awk -F. '{ print $1 }')
@scuderiaf1
scuderiaf1 / gist:03d491677e48c9e516f0
Last active Aug 29, 2015 — forked from koelling/gist:ef9b2b9d0be6d6dbab63
CVE-2015-0235 (GHOST) test code
View gist:03d491677e48c9e516f0
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
View ruby-215-stable-railsexpress-fromsource
#!/usr/bin/env bash
# repository
cd /tmp
echo "******"
echo "*** update needed yum pkgs ***"
echo "******"
yum -y install libxslt-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel mysql-devel
@scuderiaf1
scuderiaf1 / ruby214.spec
Last active Aug 29, 2015
ruby-2.1.4-stable-railexpress mock spec file for ruby rpm 2.1.4 with "skaes rails 2.1.3 express patch" filename should be /home/builder/rpmbuild/SPECS/ruby214.spec
View ruby214.spec
%define rubyver 2.1.4
Name: ruby
Version: %{rubyver}
Release: 2%{?dist}
License: Ruby License/GPL - see COPYING
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc
BuildRequires: make
@scuderiaf1
scuderiaf1 / ruby213.spec
Last active Aug 29, 2015
ruby-2.1.3-stable-railexpress mock spec file for ruby rpm 2.1.3 with "skaes rails express patch" filename should be /home/builder/rpmbuild/SPECS/ruby213.spec
View ruby213.spec
%define rubyver 2.1.3
Name: ruby
Version: %{rubyver}
Release: 2%{?dist}
License: Ruby License/GPL - see COPYING
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc
BuildRequires: make
View poodle-detector2
echo "GET /" | openssl s_client -ssl3 -connect localhost:443 2> /dev/null | grep "no peer certificate available" > /dev/null || echo "Vulnerable"