Skip to content

Instantly share code, notes, and snippets.

View DigitalCoder's full-sized avatar

Emmanuel DEILLER DigitalCoder

  • France
View GitHub Profile
/* iPad In Portrait & Landscape */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {}
/* iPad In Landscape */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {}
/* iPad In Portrait */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {}
/* Retina Display iPads */
/* #Media Queries
================================================== */
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-width : 320px) and (max-width : 480px) {}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {}
/* Smartphones (portrait) ----------- */
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@DigitalCoder
DigitalCoder / snippet.js
Last active August 29, 2015 14:07 — forked from necolas/snippet.js
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
$(document).ready(function () {
// Initialize the PubNub API connection.
var pubnub = PUBNUB.init({
publish_key: 'PUBNUB PUBLISH KEY HERE',
subscribe_key: 'PUBNUB SUBSCRIBE KEY HERE'
});
// Grab references for all of our elements.
var messageContent = $('#messageContent'),
sendMessageButton = $('#sendMessageButton'),

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@DigitalCoder
DigitalCoder / LICENSE
Last active August 29, 2015 14:27 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
CSS3 Spinning Preloader
------
A [Pen](http://codepen.io/DigitalCoder/pen/eNqazr) by [DigitalCoder](http://codepen.io/DigitalCoder) on [CodePen](http://codepen.io/).
[License](http://codepen.io/DigitalCoder/pen/eNqazr/license).