Skip to content

Instantly share code, notes, and snippets.

View jbasinger's full-sized avatar
🔮
One sec

Justin Basinger jbasinger

🔮
One sec
View GitHub Profile
angular.module('constants',[])
.constant('ENV',{
name: 'dev',
baseUrl: 'http://dev.whatever.com',
magicKey: '123-456-789',
someOtherThing: {
id: 1,
arrayOfSomeStuff: [1,2,3,4,5]
}
});
@jbasinger
jbasinger / controllerjs
Created September 28, 2015 01:30
SVL Popout Buttons Blog Snippets
angular.module('starter.controllers', ['svl.popout'])
.controller('MainCtrl', function($scope, $ionicPopover,svlPopoutDelegate) {
$scope.toggled = false;
$scope.radOffset = -Math.PI/4;
$scope.radStep = Math.PI/8;
$scope.showPopout = function($event){
if ($scope.toggled){
svlPopoutDelegate.hide();
@jbasinger
jbasinger / app.js
Last active February 20, 2016 13:29
Slide Wizard Gists
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
controller: 'AppCtrl'
})
@jbasinger
jbasinger / ReversePlugin.java
Created August 29, 2015 18:39
ReversePlugin Embeded Files
package com.sciencevikinglabs.reverseplugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaInterface;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@jbasinger
jbasinger / manifestsnippet.xml
Created August 12, 2015 00:26
Capturing Android Intents
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
@jbasinger
jbasinger / app.js
Created July 18, 2015 18:57
WeatherOrNot
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html'
})
.state('app.weather', {
@jbasinger
jbasinger / AppSetupCommands.sh
Created July 2, 2015 19:21
Ionic Push Notification Post Gists
ionic plugin add https://github.com/phonegap-build/PushPlugin.git
ionic add ngCordova
ionic add ionic-service-core
ionic add ionic-service-push
angular.module('yourTotallyAwesomeApp')
.run(function($ionicPlatform, $ionicPush, $ionicUser) {
$ionicPlatform.ready(function() {
//A cheat check to make sure we're on a device
if(window.plugins){
$ionicPush.register({
canRunActionsOnWake: true,
onNotification: function(notification) {
@jbasinger
jbasinger / push.rb
Created July 1, 2015 20:38
Ruby Ionic Push for Android
device_token = 'example_token'
ionic_private_key = 'your_ionic_private_key_here'
ionic_app_id = 'your_ionic_app_id_here'
form_data = {
'tokens' => [device_token],
'notification' => {
'alert' => "Hello Push World!",
'android' => {
'payload' => {
@jbasinger
jbasinger / FireBullet.cs
Last active August 29, 2015 14:23
FireBullet
using UnityEngine;
using System.Collections;
public class FireBullet : MonoBehaviour {
public GameObject bullet;
public float maxCoolDown;
private float timer;
private bool canShoot;