This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function install_crystal() { | |
curl https://dist.crystal-lang.org/apt/setup.sh | sudo bash | |
sudo apt-get install build-essential | |
sudo apt-get install crystal | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the Ruby Version Manager | |
function install_rvm() { | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
curl -sSL https://get.rvm.io | bash -s stable | |
source /home/$USER/.rvm/scripts/rvm | |
echo "source /home/$USER/.rvm/scripts/rvm" >> /home/$USER/.bashrc | |
rvm install 2.4.1 | |
} | |
# call the function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function install_tito() { | |
mkdir /home/$USER/tito | |
curl https://raw.githubusercontent.com/picatz/Tito-Slack-Bot/master/tito-bot.rb > /home/$USER/tito/tito.rb | |
curl https://raw.githubusercontent.com/picatz/Tito-Slack-Bot/master/tito-quotes.txt > /home/$USER/tito/tito-quotes.txt | |
gem install slack-ruby-client faye-websocket | |
} | |
function start_tito() { | |
ruby /home/$USER/tito/tito.rb -s & | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'command_lion' | |
CommandLion::App.run do | |
name "Hello World" | |
command :hello_world do | |
flag "--hello-world" | |
action do | |
puts "Hello World!" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'command_lion' | |
CommandLion::App.run do | |
name "Hello There!" | |
version "1.0.0" | |
description "A more complex 'hello' application!" | |
command :hello do | |
flag "hello" | |
type :strings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Blocks | |
NUMBERS = [1,2,3] | |
def self.require_block(&block) | |
NUMBERS.each do |number| | |
yield number | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pry" | |
require "packetgen" | |
capture = Pcap.open_live(Pcap.lookupdev, 65535, true, 1) | |
loop do | |
while packet = capture.next | |
begin | |
parsed = PacketGen.parse(packet) | |
binding.pry # exit to go to next packet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pcaprub" | |
capture = Pcap.open_live(Pcap.lookupdev, 65535, true, 1) | |
loop do | |
while packet = capture.next | |
if data = /\b(GET|POST|PUT|PATCH|DELETE|HEAD|CONNECT|OPTIONS|TRACE) ([^ ]+) (HTTP\/[0-9\/]+)/.match(packet) | |
method, path, version = data.captures | |
headers = packet.scan(/\S+\b:\s.+/).map(&:strip) | |
url = (headers.grep /\bHost:\s.+/).first.split(":").last.strip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ran as non-root user with sudo privs for the yolo | |
sudo yum install wget -y | |
wget http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm | |
sudo yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
sudo yum localinstall AdbeRdr9.5.5-1_i486linux_enu.rpm -y |