Skip to content

Instantly share code, notes, and snippets.

Working from home

Vinny Fonseca VinnyFonseca

Working from home
Block or report user

Report or block VinnyFonseca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View truncate.css
.truncate {
display: inline-block;
vertical-align: top;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
VinnyFonseca / meat-viewport.html
Last active Dec 7, 2017
Meta: Viewport No Zoom
View meat-viewport.html
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
VinnyFonseca / fb-canvas-click-scroll.js
Last active Dec 7, 2017
FB Page Tab anchor click smooth scroll
View fb-canvas-click-scroll.js
function scrollFBTo(y){
FB.Canvas.getPageInfo(function(pageInfo) {
$({y: pageInfo.scrollTop}).animate({
y: y
}, {
duration: 500,
step: function(offset) {
FB.Canvas.scrollTo(0, offset);
View pretty-log.txt
git log --pretty=format:"%h - %an, %ar : %s" --author="Vinny Fonseca"
VinnyFonseca / popup.js
Last active Dec 6, 2017
New Popup Window
View popup.js
const popup = function (url, title, w = 640, h = 320) {
let l = (screen.width / 2) - (w / 2);
let t = (screen.height / 2) - (h / 2);
return, title, `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${w}, height=${h}, top=${t}, left=${l}`);
VinnyFonseca / Standalone Cookie Implementation
Created Jun 27, 2013
Standalone Cookie Implementation Insert into Body, not Head
View Standalone Cookie Implementation
View Facebook Create Page Tab URL
View Facebook Canvas Auto Height
<div id="fb-root"></div>
<script src=""></script>
<script type="text/javascript">
var appId = 'XXXXXXXXXXXXX';
window.fbAsyncInit = function() {
appId: appId,
status: true,
cookie: true,
View Facebook Implementation
<div id="fb-root"></div>
<script src=""></script>
<script type="text/javascript">
window.fbAsyncInit = function() {
appId : "XXXXXXXXX",
status : false,
cookie : true,
xfbml : true
VinnyFonseca / Twitter Implementation
Created Jun 10, 2013
Twitter Implementation Web Intents
View Twitter Implementation
<script type="text/javascript">
window.twttr = (function (d, s, id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); = id;
js.src = "//";
fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = {
_e: [],
You can’t perform that action at this time.