Skip to content

Instantly share code, notes, and snippets.

@eveevans
eveevans / gist:3430445
Created August 22, 2012 23:07
Reveal Password
javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "\n"; } } if (s) alert("Passwords in forms on this page:\n\n" + s); else alert("No password form :(.");})();

Keybase proof

I hereby claim:

  • I am eveevans on github.
  • I am eveevans (https://keybase.io/eveevans) on keybase.
  • I have a public key ASAFoueV_IufzSogRn-5HjdKAE703a0tQi5FXzepGsAw9Ao

To claim this, I am signing this object:

@eveevans
eveevans / mk01
Last active June 13, 2023 13:08
#MusicaParaTrabajar
65 Days of Static
A Long Away From Here
Aesthesys
Aisha Duo
Al Fin De Dia
Alejandro Seoane
Ambiente
Austin TV *
Board of Canada
Commonplaces
@eveevans
eveevans / carrierwave.rb
Created November 29, 2018 00:18 — forked from iqbalhasnan/carrierwave.rb
carrierwave mini_magick image processing - quality, strip, exif rotation, gaussian blur, interlace
#config/initializers/carrierwave.rb
module CarrierWave
module MiniMagick
# Rotates the image based on the EXIF Orientation
def exif_rotation
manipulate! do |img|
img.auto_orient
img = yield(img) if block_given?
img
end
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCz9WzLA1FORyVhH1OIYGQAK5rq5R1DPAqNWRv14tDjf8XLgR6qchWhKU82jF+6oqy7534Or0vFAn2zKbGxyCcWz+zcXQyO5oGRMVhYQ/Q/1m0jfSdyOAoVsMZDWSOFM8MNXKfSAPnbXizb+gPfVA/sTxuT9Zy9BTpDf8pMxhmKs5rZtp5145L/UHeOWMNNkyf0BbIenxGb/Mkk+vt6sz72eHTvTc+9idNj389z/dcBd+rMbg5TOzv/Zz2xiVHbjBB3vJtogtLfBHGgt+BYka9fTvQEs4hYXfL4P1pQ/1uCeyUvXw59fjbbFBid7MyCaBO3hHFkMVX6gLkEudA9pApU0dZLrKkvqm9jnifn4aijff6wV3H5TjddFw3bCCs8y3j2h/Aw3QWAUT10anAHMes8iuryI25DNZZTvoFRrLvZPnSbblCc6asH8xr2Tpg42UGwzxGmlCdgG0Z8Ql9jdIly8eFOQAmshqTqQgUFaXc/hvPo19dkkkM8jFrhlohxtAE= roger@masterrace
@eveevans
eveevans / CommonCommands
Last active February 3, 2022 23:25
Common Commands
## MYSQL
create database db_name character set utf8 collate utf8_general_ci;
repair table table_name;
drop database db_name;
mysql -uroot -p db_name < file.sql
grant ALL PRIVILEGES ON dbName.* to 'ironman'@'%';
{
"version": "2.0.0",
"tasks": [
{
"label": "Rspec - all",
"type": "shell",
"command": "bin/rspec -fd",
"problemMatcher": [],
"group": {
"kind": "test",
@eveevans
eveevans / rspec_model_testing_template.rb
Created September 28, 2019 05:56 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@eveevans
eveevans / StreamSave.rb
Created May 10, 2012 23:06
Ruby script for save mp3 stream
require 'rubygems'
require 'net/http'
require 'uri'
BIT_RATE = 48 #6kbxseg * 60 seg (a min) * 15min
TAMO_CORTE = (BIT_RATE/8) * 60 * 15 #en KB
url = URI.parse('http://186.1.15.253:8000/')
Net::HTTP.start(url.host, url.port) do |http|
/**
* Loop.
*
* Shows how to load and play a QuickTime movie file.
*
*/
PGraphics pg;
import processing.video.*;