- Download all files.
- Build the Crystal part:
crystal build --release --cross-compile --prelude ./no_main library.cr
^ You can leave this out
^ We want to link ourselves!
^ Use our custom prelude!
#!/bin/bash | |
# | |
# | |
# MIT License | |
# | |
# Copyright (c) 2022 Jay Caines-Gooby, @jaygooby, jay@gooby.org | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
#Reference | |
#https://devnotcorp.wordpress.com/2012/08/21/usage-examples-of-rubys-openssl-lib/ | |
#!/usr/bin/ruby | |
require 'openssl' | |
require 'date' | |
require 'time' | |
#/bin/bash -e | |
RUBY_VERSION=2.0.0 | |
if [ "$RUBY_VERSION" == '2.0.0' ]; then | |
yum -y install ruby20 rubygems20 ruby-devel | |
alternatives --set ruby /usr/bin/ruby2.0 | |
elif [ "$RUBY_VERSION" == '1.9.3' ]; then | |
yum -y install ruby19 rubygems19 ruby19-devel |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
require 'optparse' | |
options = OptionParser.new("usage: #{$0}") do |opts| | |
opts.on('-f','--file FILE','loads a file') do |file| | |
puts "loading file #{file}" | |
opts.separator "#{file} options:" | |
opts.on('-c','--custom') do | |
puts "custom option defined by file #{file}" | |
end |
Do your part to resist Government surveillance and take back your privacy:
#!/usr/bin/env ruby | |
# author eric monti ~ nov 20, 2012 | |
# license: DWTFYW | |
require 'rubygems' | |
require 'ffi' | |
class LLVMDisassembler | |
module C | |
extend FFI::Library | |
ffi_lib ['LLVM', 'LLVM-3.2svn', 'LLVM-3.1', 'LLVM-3.0'] |
RubyGems.org has little in the way of defenses against tampering. Right now, new gems could be uploaded to S3 and distributed to users worldwide without detection, and the only thing preventing this is the security of the AWS credentials presently stored on world-facing web servers. S3 Versioning is a step that could be taken immediately to reduce the severity of compromise, but a larger solution is required.
This document proposes a .gemsig
file as a means of verifying that a gem has not been modified during distribution. This file would be distributed alongside the .gem
files, allowing clients to verify authenticity.
#!/usr/bin/env ruby | |
require 'celluloid' | |
require 'net/http' | |
class Fetcher | |
include Celluloid | |
def get(action, url) | |
puts "doing work.." | |
res = action.call(url) |