Skip to content

Instantly share code, notes, and snippets.

View aburgd's full-sized avatar

Alec Burgdorf aburgd

  • United States
View GitHub Profile
@aburgd
aburgd / DHKE.rb
Created December 1, 2015 00:22
publicKey class method
class Diffie
p defined?(Diffie)
def publicKey(base, modPrime, aSecret)
@publicKey = 0
# puts "Enter your shared prime (g): "
# base = Integer(gets.chomp)
# puts "Enter your second prime (p): "
@aburgd
aburgd / DHKE.rb
Last active December 1, 2015 01:19
Diffie-Hellman Key Exchange calculations program
class Diffie
def self.publicKey(base, modPrime, aSecret)
# puts "Enter your shared prime (g): "
# base = Integer(gets.chomp)
# puts "Enter your second prime (p): "
# modPrime = Integer(gets.chomp)
# puts "Enter your secret prime (a): "
# aSecret = Integer(gets.chomp)
@aburgd
aburgd / openpgp.txt
Created March 1, 2016 01:44
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:695915d0929cbc948bce52ff29e0479b99c8a397]
@aburgd
aburgd / DHKE2.rb
Last active April 20, 2016 01:56
Comments in code about ideal functioning
require 'securerandom'
require 'prime'
# Defines class and methods for DHKE
class Diffie
# Calculates public key
def self.pk(g, m, a)
return pk = g ** a % m
end
# Calculate shared secret

Keybase proof

I hereby claim:

  • I am aburgd on github.
  • I am aeburgd (https://keybase.io/aeburgd) on keybase.
  • I have a public key whose fingerprint is 6959 15D0 929C BC94 8BCE 52FF 29E0 479B 99C8 A397

To claim this, I am signing this object:

bot.rb:53: warning: assigned but unused variable - characters
bot.rb:76: warning: assigned but unused variable - characters
/home/nitrous/.rvm/gems/ruby-2.2.1/gems/cinch-2.3.2/lib/cinch/logger/formatted_logger.rb:44: warning: character class has duplicated range: /[^[:print:][:space:]]/
/home/nitrous/.rvm/gems/ruby-2.2.1/gems/cinch-2.3.2/lib/cinch/logger/formatted_logger.rb:44: warning: character class has duplicated range: /[^[:print:][:space:]]/
[2016/05/20 01:12:43.803] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x000000023d6600 @prefix=/^/, @pattern=/!hi/, @suffix=/$/>`, reacting on `message
`
[2016/05/20 01:12:43.804] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x000000023d5a98 @prefix=nil, @pattern=/^\!time (.+?)/, @suffix=nil>`, reacting o
n `message`
[2016/05/20 01:12:43.804] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x000000023d4eb8 @prefix=/^/, @pattern=/!help/, @suffix=/$/>`, reacting on `messa
ge`
bot.rb:53: warning: assigned but unused variable - characters
bot.rb:76: warning: assigned but unused variable - characters
/home/nitrous/.rvm/gems/ruby-2.2.1/gems/cinch-2.3.2/lib/cinch/logger/formatted_logger.rb:44: warning: character class has duplicated range: /[^[:print:][:space:]]/
/home/nitrous/.rvm/gems/ruby-2.2.1/gems/cinch-2.3.2/lib/cinch/logger/formatted_logger.rb:44: warning: character class has duplicated range: /[^[:print:][:space:]]/
[2016/05/20 01:51:44.355] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x000000025da618 @prefix=/^/, @pattern=/!hi/, @suffix=/$/>`, reacting on `message
`
[2016/05/20 01:51:44.355] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x000000025d9a88 @prefix=nil, @pattern=/^\!time (.+?)/, @suffix=nil>`, reacting o
n `message`
[2016/05/20 01:51:44.356] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x000000025d8ea8 @prefix=/^/, @pattern=/!help/, @suffix=/$/>`, reacting on `messa
ge`
require 'cinch'
require 'securerandom'
class Time
include Cinch::Plugin
match (/(\!time [+-]\d{2}:00)/)
def execute(m, zone)
m.reply 'The time is now #{Time.now.localtime(zone).inspect}.'
end
require 'cinch'
class Time
include Cinch::Plugin
match (/(\!time [+-]\d{2}:00)/)
def execute(m, zone)
m.reply 'The time is now #{Time.now.localtime(zone).inspect}.'
end
end
➜ ~ node -v
v6.2.0
➜ ~ npm install -g grunt-cli
module.js:442
throw err;
^
Error: Cannot find module '/home/vagrant/install'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)