Skip to content

Instantly share code, notes, and snippets.

02 This is a turkey:
03
04 ,+*^^*+___+++_
05 ,*^^^^ )
06 _+* ^**+_
07 +^ _ _++*+_+++_, )
08 _+^^*+_ ( ,+*^ ^ \+_ )
09 { ) ( ,( ,_+--+--, ^) ^\
10 { (@) } f ,( ,+-^ __*_*_ ^^\_ ^\ )
11 {:;-/ (_+*-+^^^^^+*+*<_ _++_)_ ) ) /
require 'watir-webdriver'
b = Watir::Browser.new
b.goto 'facebook.com'
b.text_field(:id => 'email').set ''
b.text_field(:id => 'pass').set ''
b.button(:value => 'Log In').click
while(true) do
b.text_field(:name => 'xhpc_message').click
b.text_field(:name => 'xhpc_message_text').set '@northwestern ski trip'
t.c: In function ‘function2’:
#include <stdio.h>
int main()
{
function1(1);
function2();
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/*
Author: Cynthia Stamelos
Date: 1/28/13
desc "Renames all .html.erb files to .html.haml"
task :haml do
print "looking for erb views..\n"
files = `find ./app/views -name *.html.erb`
files.each_line do |file|
file.strip!
print "parsing file: #{file}\n"
`mv #{file} #{file.gsub(/\.erb$/, ".haml")}`
end
end
.nav-mobile.clearfix
/ touching this button shows search bar
.navbarbutton.searchbtn.left{:onclick => "$('#search-box,#mobile-search').toggle(500);"}
%img{:src => asset_path("btn-search-mobile.png")}
%a.navbartitle{:href => "/"}
#nav-tab-bar
.tab-bar-left-cap
.tab-bar-center
#tab-bar-items
%a.item{:href => "/"}
@jontonsoup
jontonsoup / gist:4983253
Created February 19, 2013 05:05
checks the security of a directory full of apks
require 'rubygems'
require 'watir-webdriver'
b = Watir::Browser.start 'http://www.android-permissions.org/'
#put your directory here
entries = Dir.entries("/Users/Jonathan/Desktop/a")
entries.each do |entry|
b.goto("http://www.android-permissions.org/")
require 'rubygems'
require 'watir-webdriver'
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 3000 # seconds – default is 60
b = Watir::Browser.new :firefox, :http_client => client
b.goto 'http://www.android-permissions.org/'
#put your directory here
require 'rubygems'
require 'alchemy_api'
require 'json'
require 'pry'
AlchemyAPI.key = "bfc9f1c85f548d2ee9272e49ad3866f0e663cef1"
file = File.open("json.txt")
c = file.read
c = c.scan(/[[:print:]]/).join
2013-04-02T19:50:31+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"ew50g1alr/1lZJCMcSuYq7Ux0QLJpWYFLTjSDnaKpR0=", "course"=>{"
name"=>"asdf", "credit"=>"3", "avatar"=>#<ActionDispatch::Http::UploadedFile:0x000000054f3710 @original_filename="Todd -- Feedback.rtf", @content_type="text/rtf", @headers="Content-Disposition: form-data; name=\"course[avatar]\"; filename=\"Todd -- Feedback.rtf\"\r\nContent-Type: text/rtf\r\n", @tempfile=#<File:/tmp/RackMultipart20130402-2-1t1dnpj>>, "distro"=>"Auditing and Accounting"}, "commit"=>"Save"}
2013-04-02T19:50:31+00:00 app[web.1]: [paperclip] Saving attachments.
2013-04-02T19:50:31+00:00 app[web.1]: Redirected to http://www.mylicensebuddy.com/
2013-04-02T19:50:31+00:00 app[web.1]: Completed 302 Found in 25ms (ActiveRecord: 16.9ms)
2013-04-02T19:50:18+00:00 heroku[router]: at=info method=GET path=/ host=www.mylicensebuddy.com fwd="165.124.215.179" dyno=web.1 connect=11ms service=69ms status=200 bytes=9813
2013-04-02T19:50:31+00:00 heroku[router]: at=in