Skip to content

Instantly share code, notes, and snippets.

View pre's full-sized avatar
🚀
Cloud & Kubernetes

Petrus Repo pre

🚀
Cloud & Kubernetes
View GitHub Profile
@pre
pre / gist:c1f17f5b585a9355acc8
Created January 28, 2015 09:15
MapViewController.m
//
// MapViewController.m
// AppGyver
//
// Created by Rafael on 6/03/14.
// Copyright (c) 2014 AppGyver Inc. All rights reserved.
//
#import "MapViewController.h"
@pre
pre / gist:c29860151a904a1b2c4b
Created January 28, 2015 09:00
Crosswalk AndroidManifest.xml
?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appgyver.runtime.standalone.chromium"
android:windowSoftInputMode="adjustPan">
<!-- Essentials -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@pre
pre / gist:94c55860f9f9d8def150
Created January 27, 2015 15:11
MapView rnd
- (void)viewDidLoad
{
[super viewDidLoad];
if(!self.mapView){
// create the map view
self.mapView = [[MKMapView alloc] initWithFrame:self.view.frame];
//configure the transparency of the webview
//and disable the interaction.. so all events are handled in the mapview
@pre
pre / gist:b591aa341fd621e33eab
Created January 19, 2015 13:23
CordovaWebViewInterface
package org.apache.cordova;
import com.appgyver.ui.webview.AGWebViewInterface;
import android.view.View;
import android.view.ViewParent;
import android.webkit.WebChromeClient;
import java.util.HashMap;
@pre
pre / gist:97e411ee31ecf3c09ab7
Created December 17, 2014 14:33
Push Notification test with PushPlugin
<script>
function onDeviceReady() {
pushNotification = window.plugins.pushNotification
tokenHandler = function(a) { console.log(a); steroids.logger.log(a); };
errorHandler = function(a) { console.log(a); steroids.logger.log(a); };
onNotificationAPN = function(a) { console.log(a); steroids.logger.log(a); };
@pre
pre / gist:4682211
Last active December 12, 2015 00:18
Convert a Quick Time screencast to GIF
# Convert a Quick Time screencast to GIF
# Creates two gifs, one HUGE and one optimized.
#
# Dependencies:
# % brew install ffmpeg imagemagick
#
# Props to http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil
function gifify {
SRC="$1"
DEST="$2"