Skip to content

Instantly share code, notes, and snippets.

@dscamahorn
dscamahorn / jquery.plugin.js
Created November 28, 2015 03:45
jQuery Plugin Template
(function() {
$.fn.myPlugin = function(params) {
//Plugin code
}
})(jQuery);
@dscamahorn
dscamahorn / IIFE.js
Last active November 28, 2015 03:18
IIFE ("Immediately Invoked Function Execution") wrapper
(function() {
//
})();
@dscamahorn
dscamahorn / ionic-zoom-pan-fullscreen-modal.html
Last active October 5, 2015 20:22
Enable zooming and panning in an Ionic app modal.
<ion-modal-view class="modal-fullscreen">
<ion-header-bar>
<h1 class="title">My Title</h1>
<button class="button" ng-click="close()"><i class="icon close"></i></button>
</ion-header-bar>
<ion-content overflow-scroll="true">
<ion-scroll zooming="true" direction="xy" scrollbar-x="false" scrollbar-y="false" min-zoom="1" class="helper-zoom-container">
<div class="row">
<div class="col col-center">
<img src="https://placeholdit.imgix.net/~text?txtsize=1024&txt=1024%C3%97176&w=1024&h=1024" alt="" class="img-center img-fullscreen" />
@dscamahorn
dscamahorn / sync-atom-settings.txt
Created September 15, 2015 01:15
Sync atom.io settings between computers with Dropbox.
$ mv ~/.atom ~/Dropbox/Apps/Atom
$ ln -s ~/Dropbox/Apps/Atom ~/.atom
@dscamahorn
dscamahorn / emulate-specific-target-device.txt
Last active October 29, 2015 11:59
Target a device with ionic/cordova
//Ionic
//Available Devices
ios-sim showdevicetypes
//Target a device
ionic emulate ios --target="iPhone-4s"
//Cordova
//Available Devices
./platforms/ios/cordova/lib/list-emulator-images
//Target a device
@dscamahorn
dscamahorn / webfonts.scss
Created August 14, 2015 16:08
Web font definitions and stacks.
// =FONTS
//---------------------------------------------------------------------------------------
//Font 01
@font-face {
font-family: 'font-01';
src: url('../fonts/webfont.eot');
src: url('../fonts/webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/webfont.woff2') format('woff2'),
url('../fonts/webfont.woff') format('woff'),
@dscamahorn
dscamahorn / cordova-access-origin-config.xml
Last active August 29, 2015 14:27
Allow mailto and tel links to launch external applications from within a Cordova app. - Does not work in iOS Simulator, only on devices.
<access origin="*"/>
<access origin="tel:*" launch-external="yes" />
<access origin="mailto:*" launch-external="yes" />
<html class="no-touch">
<head>
<style>
.no-touch h1 {
color:red;
}
.touch h1 {
color:green;
}
</style>
button {
background-color: #fff;
border:solid 1px #333;
color: #000;
.no-touch &:hover, .touch &:active {
background-color: #333;
color: #fff;
}
}