Skip to content

Instantly share code, notes, and snippets.

View aginz's full-sized avatar

Ashley Ginsberg aginz

  • Fort Lauderdale, FL
View GitHub Profile
@aginz
aginz / bumpme
Last active October 10, 2018 18:37
Wed Oct 10 18:37:06 UTC 2018
@aginz
aginz / active_record_log_subscriber.rb
Created January 20, 2016 16:56 — forked from rbraaf/active_record_log_subscriber.rb
Show lines for slow queries
# Add mixin to /config/initializers/
module LogQuerySource
def debug(*args, &block)
return unless super
backtrace = Rails.backtrace_cleaner.clean caller
relevant_caller_line = backtrace.detect do |caller_line|
!caller_line.include?('/initializers/')
end
@aginz
aginz / oldParser.js
Last active August 29, 2015 14:21 — forked from allolex/oldParser.js
function SplitIt(macsplit) {
var temp = new Array();
var reversed = new Array();
var re_macsplit = /[A-F0-9]/;
var j = 0;
for (var i = 0; i < macsplit.length; i++) { // Loop through whole MAC ID string
if (re_macsplit.test(macsplit[i])) { // Match to hexidecimal number regexp
temp[j] = macsplit[i]; // Assign number to the array item