Skip to content

Instantly share code, notes, and snippets.

💭
Making Stuff

David Boyne boyney123

💭
Making Stuff
View GitHub Profile
@boyney123
boyney123 / AngularOdometer.js
Last active Oct 24, 2015
odometer.js - Angular Directive Example
View AngularOdometer.js
//Directive
angularApp.directive('angularOdometer', function () {
return {
restrict: 'A',
link: function(scope, element, attrs) {
//Creates new instance of odometer for the element
new Odometer({el: element[0], value: scope[attrs.odometer]});
//Watch for changes and update the element value (causing odometer to redraw)
@boyney123
boyney123 / run_ionic_app_on_all_connected_android_devices.sh
Last active Sep 29, 2015
Simple bash script to remove, build, install and launch your ionic app on all connected android devices (android simulators or actual devices).
View run_ionic_app_on_all_connected_android_devices.sh
#!/bin/sh
#Your app id which can be found in your config.xml file (widget id)
app=com.ionicframework.myNewApp
pathToAPK=platforms/android/build/outputs/apk/android-debug.apk
echo "Running Ionic Build"
ionic build
@boyney123
boyney123 / Example.js
Last active Jan 31, 2017
Media Querys in React using CSS and Wrapper Components
View Example.js
import React, { Component, PropTypes } from 'react';
import MediaQuery from './media-query';
class Example extends Component {
render() {
return (
<div>
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="/favicon.ico">
<title>React App</title>
View gist:be8de3cdd4aaa91d680c5e755ec179ab
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');
module.exports = {
entry: {
'app.js': './src/app.js'
},
View webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');
module.exports = {
entry: {
'app.js': './src/app.js'
},
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="/favicon.ico">
<title>React App</title>
View ISSUE_TEMPLATE.md
  • I have searched the issues of this repository and believe that this is not a duplicate.
View PULL_REQUEST_TEMPLATE.md

Before submitting a pull request, please make sure the following is done:

  1. You have merged in the latest changes from master.
  2. Resolved any conflicts that may have happened from that merge.
  3. Ensure that you have run all tests and linting locally with npm run test and npm run lint.
View CODEOWNERS
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in the repo.
* @defunkt
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
*.js @octocat @github/js
You can’t perform that action at this time.