Skip to content

Instantly share code, notes, and snippets.

View TonyArra's full-sized avatar
:shipit:
ship it

Tony Arra TonyArra

:shipit:
ship it
View GitHub Profile
$('input[name=bar1]').bind("paste", function(e){
var pastedData = e.originalEvent.clipboardData.getData('text');
var sections = pastedData.split("-");
for (var i = 0; i < sections.length; i++) {
$('input[name=bar' + (i + 1) + ']').val(sections[i]);
}
} );
#!/usr/bin/env ruby
def longest_collatz(n)
longest_sequence = 0
longest_n = 0
collatz_map = {}
until n == 1
n -= 1
if collatz_map.key? n
length = collatz_map[n]
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id ="test" data-test="test"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Hello World</h1>
<div class="jumbotron">
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Hello World</h1>
<div class="jumbotron">
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="middle">
<p class="loud">FIRST.</p>
<p class="envy">But we're both centered at least.</p>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
teststet
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
Hello world
</body>
</html>