Skip to content

Instantly share code, notes, and snippets.

View Hunter-Dolan's full-sized avatar

Hunter Dolan Hunter-Dolan

View GitHub Profile
document.write('I am writing this message today to show you how some people don\'t know how to strip javascript from certain elements of a page, app, or tweet. Odds are if you\'re reading this you are using Osfoora or another Twitter Application that doesn\'t take security seriously... Now most will say... "oh what can you do with JS". Well the answer to that is many things. For instance get you\'re current location\, redirect you to an advertising site, Crash what ever app you\'re using right now. And maybe even get information from you\'re current app like API keys, passwords ,etc... Now I\'m not going to do any of that, because I\'m a nice person, but come on app writers! Take security a bit more seriously!!');
background: #fefffe; /* Old browsers */
background: -moz-linear-gradient(top, #fefffe 0%, #c1c1c1 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefffe), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fefffe 0%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fefffe 0%,#c1c1c1 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #fefffe 0%,#c1c1c1 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fefffe', endColorstr='#c1c1c1',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #fefffe 0%,#c1c1c1 100%); /* W3C */
#title {
position: relative;
right: 0;
top: -110px;
visibility: visible;
z-index: 0;
text-align: right;
font-weight: bold;
font-size: 50px;
font-family: Helvetica, Arial;
@Hunter-Dolan
Hunter-Dolan / gist:1390366
Created November 24, 2011 00:44
random.m
#import <stdlib.h>
+ (NSNumber *)randomFourDigitNumber
{
int randomNumber = rand()%9999 + 1000;
NSArray *badNumbers = [NSArray arrayWithObjects:@"69",@"666",@"0",@"11",@"22",@"33",@"44",@"55",@"66",@"77",@"88",@"99", nil];
for (NSString *badNumber in badNumbers) {
@Hunter-Dolan
Hunter-Dolan / BestServices.php
Created December 20, 2011 02:31
BestServices
<?php
$bestServices = array("Google", "Github", "Twitter", "Gmail");
foreach($bestServices as $bestService) {
echo $bestService."\n";
}
?>
@Hunter-Dolan
Hunter-Dolan / mypage.haml
Created December 20, 2011 02:41
Haml or HTML
%html
%head
%title My Page
%script{:src => "myscript.js"}
%body
#myDiv
%h1 Howdy!
%p Hello this is my page!
@Hunter-Dolan
Hunter-Dolan / RevItV2.rb
Created February 20, 2012 21:56
Rev it!
def crash_it
puts "thread_started"
# The lower this number the more heat your cpu will generate
count_to = 1
i = 1
count = 0
while i do
i = (i * (34634523 * 23) / 235 * 12359829835) ^ 8799889
#header
width 100%
height 50px
box-shadow 0 0 14px 5px rgba(0,0,0,0.35)
background-color: rgba(254, 254, 254, 0.8);
color #444
position fixed
text-shadow 0 1px 0 #FFF
if currentPlace in placeWords
starters = ["The time is ", "#{nick} the time's ", "The time's ", "The time is currently ",""]
t = Time.nowp
theTime = t.strftime("%I:%M%p")
"#{starters.sample}#{theTime}in#{currentPlace}"
else
uhohReturns = ["Valid place please!", "Somewhere legit please."]
uhohReturns.sample
end
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property