Skip to content

Instantly share code, notes, and snippets.


Igor Escobar igorescobar

View GitHub Profile
FranckFreiburger / getJpegQuality.js
Created Oct 4, 2018
pure JavaScript jpeg quality value recover
View getJpegQuality.js
// javascript jpeg decoder:
// Determine the JPEG compression quality from the quantization tables:
// JPEG File Layout and Format:
// jpeg constants:
function getQuantizationTables(data) {
var quantizationTables = []
var dctZigZag = new Int32Array([
justinko / callback_disabler.rb
Created Sep 2, 2011
Disable raw filter callbacks in RSpec
View callback_disabler.rb
# In spec/support/callback_disabler.rb
module CallbackDisabler
def self.store_callbacks(model, filters)
model = constantize(model)
filters.each do |filter|
model.send("_#{filter}_callbacks").each do |callback|
stored_callbacks[model] << {
filter: filter, kind: callback.kind, raw_filter: callback.raw_filter