Skip to content

Instantly share code, notes, and snippets.

View chrismendis's full-sized avatar

Chris Mendis chrismendis

  • Format
  • Toronto, Canada
View GitHub Profile
This file has been truncated, but you can view the full file.
window.standardEmojis = [{"name":"HASH KEY","unified":"0023-FE0F-20E3","non_qualified":"0023-20E3","docomo":"E6E0","au":"EB84","softbank":"E210","google":"FE82C","image":"0023-fe0f-20e3.png","sheet_x":0,"sheet_y":0,"short_name":"hash","short_names":["hash"],"text":null,"texts":null,"category":"Symbols","sort_order":132,"added_in":"3.0","has_img_apple":true,"has_img_google":true,"has_img_twitter":true,"has_img_facebook":false,"has_img_messenger":false},{"name":null,"unified":"002A-FE0F-20E3","non_qualified":"002A-20E3","docomo":null,"au":null,"softbank":null,"google":null,"image":"002a-fe0f-20e3.png","sheet_x":0,"sheet_y":1,"short_name":"keycap_star","short_names":["keycap_star"],"text":null,"texts":null,"category":"Symbols","sort_order":133,"added_in":"3.0","has_img_apple":true,"has_img_google":true,"has_img_twitter":true,"has_img_facebook":false,"has_img_messenger":false},{"name":"KEYCAP 0","unified":"0030-FE0F-20E3","non_qualified":"0030-20E3","docomo":"E6EB","au":"E5AC","softbank":"E225","google":"FE837","
@chrismendis
chrismendis / android-ff-height-bug.html
Created May 26, 2014 17:18
Android Firefox 26 Height Issue
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, initial-scale=1, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="http://s.codepen.io/assets/reset/reset.css">
<style media="screen">
html, body {
width: 100%;
}
@chrismendis
chrismendis / HOWTO.md
Created May 22, 2014 02:34
HOWTO: Contribute to another fork of a repo that you've already forked on Github

NB: This also works for the case where you'd like to contribute to the original repo, but you've already forked a fork of the original repo.

Let johndoe/coolrepo be the name of the fork that you'd like to contribute to.

Let master be the branch of johndoe/coolrepo that you'd like to start working from.

  1. Choose a name for a new remote that you'll use in subsequent steps. Let's use yupstream.
  2. git remote add yupstream git@github.com:johndoe/coolrepo.git
  3. git fetch yupstream master
  4. Choose a name for a new branch that will contain the fork that you'd like to contribute to. Let's use feature/add-to-coolrepo.
<!doctype html>
<html lang="en">
<head>
<title>My Web Page</title>
<meta charset="utf-8">
<link href="/stylesheets/main.css" rel="stylesheet">
</head>
<body>
</body>
</html>
@chrismendis
chrismendis / install-error
Created November 5, 2013 18:17
generator-express-angular installation error
npm ERR! peerinvalid The package generator-karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer generator-angular-fullstack@0.0.5 wants generator-karma@~0.6.0
npm ERR! peerinvalid Peer generator-angularexpress@0.0.3 wants generator-karma@~0.5.0
npm ERR! peerinvalid Peer generator-express-angular@0.2.8 wants generator-karma@~0.5.0
@chrismendis
chrismendis / preventForwardTabbing.coffee
Created February 11, 2013 15:17
Preventing the user from tabbing forward
preventFocusContinuation: (ev) ->
if ev.which == 9 and not ev.shiftKey
ev.preventDefault()
@chrismendis
chrismendis / log_omniture_img_request.bookmarklet.js
Created October 5, 2011 16:53
Log the Omniture image request to the console
javascript:var%20j=document.styleSheets,i=document.images,r='';for(var%20x=0;x<j.length;x++)if(j[x].imports)for(var%20y=0;y<j[x].imports.length;y++)if(j[x].imports[y].href.toLowerCase().indexOf('/b/ss/')>=0)r+=j[x].imports[y].href+"\n\n";for(var%20x=0;x<i.length;x++)if(i[x].src.toLowerCase().indexOf('/b/ss/')>=0)r+=i[x].src+"\n\n";for(w_m%20in%20window)if(w_m.substring(0,4)=='s_i_'&&window[w_m].src)if(window[w_m].src.indexOf('/b/ss/')>=0)r+=window[w_m].src;void(console.info('The%20Omniture%20image%20request%20is\n\n'%20+%20r))
@chrismendis
chrismendis / external_interface_hack.as
Created August 22, 2011 21:22
Run arbitrary JavaScript from ActionScript 3
import flash.external.ExternalInterface;
var docTitle:String = ExternalInterface.call("function () {return window.document.title;}");
ExternalInterface.call("alert", "Alerting an Actionscript variable: " + docTitle);
@chrismendis
chrismendis / facebookSignedRequestToJSON.php
Created April 20, 2011 19:31
Returns a JSON object containing the signed request that Facebook sends to your FB app as a POST variable.
$req = htmlspecialchars($_POST['signed_request']);
$reqParts = split('\.', $req);
$encodedValue = $reqParts[1];
$encodedValue = preg_replace('/\+/', '-', $encodedValue);
$encodedValue = preg_replace('/\//', '_', $encodedValue);
$pad = strlen($encodedValue) % 4;
if ($pad > 0) {
$pad = 4 - $pad;
}
$encodedValue = str_pad($encodedValue, $pad, '=');
@chrismendis
chrismendis / hosts-sample
Created March 8, 2011 16:13
Example of Virtual Host setup for Apache
127.0.0.1 localhost
127.0.0.1 local.ltsb.mighty.ca
127.0.0.1 local.ltsb.fr.mighty.ca