Skip to content

Instantly share code, notes, and snippets.

View cod3cow's full-sized avatar

Cod3Cow cod3cow

View GitHub Profile
@cod3cow
cod3cow / toggle.html
Created March 7, 2017 10:11
css toggle with input type checkbox
<p>
option 1
<label class="switch">
<input type="checkbox">
<div class="slider"></div>
</label>
option 2
</p>
@cod3cow
cod3cow / kv-redaktion-html-cheat-sheet.html
Last active February 28, 2017 00:46
KV Redaktion - HTML Cheat Sheet
<!-- Überschriften -->
<h1>1. Überschrift</h1>
<h2>2. Überschrift</h2>
<h3>3. Überschrift</h3>
<h4>4. Überschrift</h4>
<h5>5. Überschrift</h5>
<h6>6. Überschrift</h6>
@cod3cow
cod3cow / ionic-gulp-fonts-copy.js
Created December 21, 2016 10:52
gulp: add src for plugin ionic-gulp-fonts-copy
gulp.task('fonts', function(){
return copyFonts({
src: [
'node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)',
'app/theme/fonts/**/*.+(ttf|woff|woff2)'
],
dest: 'www/build/fonts'
})
});
@cod3cow
cod3cow / googleplace.directive.ts
Created December 20, 2016 14:29
google place directive for angular 2
import {Directive, ElementRef, EventEmitter, Output} from '@angular/core';
import {NgModel} from '@angular/forms';
declare var google:any;
@Directive({
selector: '[googleplace]',
providers: [NgModel],
host: {
'(input)' : 'onInputChange()'
@cod3cow
cod3cow / .gitignore
Last active April 4, 2017 07:13 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@cod3cow
cod3cow / Google Maps Simple Multiple Marker Example
Created September 26, 2016 12:38 — forked from parth1020/Google Maps Simple Multiple Marker Example
Google Maps Simple Multiple Marker Example
<html>
<head>
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="height: 400px; width: 500px;">
</div>
<script type="text/javascript">
@cod3cow
cod3cow / location.ts
Last active October 5, 2021 17:23
start external map navigation from ionic 2 app for ios and android; needs cordova-plugin-geolocation
startExternalMap() {
if (this.location.latitude) {
this.platform.ready().then(() => {
Geolocation.getCurrentPosition().then((position) => {
// ios
if (this.platform.is('ios')) {
window.open('maps://?q=' + this.location.name + '&saddr=' + position.coords.latitude + ',' + position.coords.longitude + '&daddr=' + this.location.latitude + ',' + this.location.longitude, '_system');
};
// android
if (this.platform.is('android')) {
@cod3cow
cod3cow / Flip on click without JS.markdown
Created July 7, 2016 05:45
Flip on click without JS
@cod3cow
cod3cow / gulpfile.js
Created June 23, 2016 13:38
ionic gulpfile.js
var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var rename = require('gulp-rename');
var convertEncoding = require('gulp-convert-encoding');
var notify = require('gulp-notify');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var annotate = require('gulp-ng-annotate');
@cod3cow
cod3cow / ionRadio.js
Created November 6, 2015 12:34 — forked from mlynch/ionRadio.js
ionRadio fix for iOS 9 bugs
/**
* ionRadioFix - fixes a bug in iOS 9 UIWebView that breaks the tilde selector in CSS. To
* use this fix, include it after your Ionic bundle JS.
*
* Note: due to Angular directive override limitations, you'll need to change any reference
* to <ion-radio> to <ion-radio-fix> to apply this patched radio button.
*
* Also, make sure to add the new CSS from the second part of this gist.
*/
angular.module('ionic').directive('ionRadioFix', function() {