Skip to content

Instantly share code, notes, and snippets.

View dannyvassallo's full-sized avatar

Dan Vassallo dannyvassallo

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html style="vertical-align: baseline; font-style: normal; font-variant: normal; font-weight: normal; font-size: normal; line-height: normal; margin: 0; padding: 0; border: 0;">
<head><style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
<!DOCTYPE html>
<html>
<head>
<link href="http://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet" type="text/css">
<title></title>
</head>
<body>
<div>
<div id="wrapper" style="width: 100%; position: absolute; top: 0; background-image: url('https://s3.amazonaws.com/myfangate.com/vydiaemail/repeatingbg.jpg'); background-repeat: repeat; overflow-x: hidden;">
var catItemS = ['.cat-item-45', '.cat-item-36'];
var catItemsLength = catItemS.length;
for (var i = 0; i < catItemsLength; i++){
orGanize(catItemS[i]);
}
function orGanize(){
var catItem = catItemS[i]
@dannyvassallo
dannyvassallo / index.html
Last active August 29, 2015 14:09
Play Audio on Click
<div class="play">Play</div>
@dannyvassallo
dannyvassallo / Bloc Ruby Notes
Last active August 29, 2015 14:10
BLOC Ruby Notes
=== STRING INTERPOLATION ===
Combining strings and numbers is called string interpolation.
String interpolation is the act of inserting a non-string value into a String,
thus resulting in a new String. Interpolation is accomplished with this #{ } syntax.
EXAMPLES:
• p "hello #{3}"
• num = 5
@dannyvassallo
dannyvassallo / gist:04b04a400edcd40745a2
Created March 25, 2015 15:10
Put Rails App in iFrame on Fangate
In Rails 4 App
application.rb:
config.action_dispatch.default_headers.merge!({'X-Frame-Options' => 'ALLOWALL'})
In Fangate:
<style>
@dannyvassallo
dannyvassallo / Fngt UTM
Created March 26, 2015 19:21
Translates fngt UTM arguments to readable UTM arguments for Google Analytics outside of facebook tan apps
//Get fngt appdata
var urlParams;
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
Your CSS
<style>
#map_canvas {
height: 250px;
margin: 0;
padding: 0; }
</style>
Put this where you want the map to show
<iframe height="450" frameborder="0" style="border:0; width: 100%;" src="https://www.google.com/maps/embed/v1/place?q=Windward%20Beach%20Park%2C%20265%20Princeton%20Ave%2C%20Brick%2C%20NJ%2008724%2C%20United%20States&key=AIzaSyDKm5_ve-zgpXD0zxp89PYnibNPSO0BoSM"></iframe>
@dannyvassallo
dannyvassallo / Twitter Sentiment Report RUBY
Created April 16, 2015 18:56
Twitter Sentiment Report RUBY
require 'sad_panda'
require 'twitter'
config = {
consumer_key: "*",
consumer_secret: "*",
}
client = Twitter::REST::Client.new(config)