Skip to content

Instantly share code, notes, and snippets.

View marcandreappel's full-sized avatar

Marc-André Appel marcandreappel

View GitHub Profile
@marcandreappel
marcandreappel / states_provinces.php
Created August 29, 2011 13:35
Concrete5 - Liste des départements de la France dans : helpers / lists / states_provinces.php, il faut remplacer le fichier (ou son contenu) par le fichier ci-dessous
<?
/**
* @package Helpers
* @category Concrete
* @author Andrew Embler <andrew@concrete5.org>
* @copyright Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
* @license http://www.concrete5.org/license/ MIT License
*/
/**
@marcandreappel
marcandreappel / gist:9189422
Created February 24, 2014 14:34
Git log replacement
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
import {Injectable} from "@angular/core";
import {Device} from 'ionic-native';
declare var cordova : any;
var PUSHWOOSH_APP_ID = 'XXXXX-XXXXX';
var GOOGLE_PROJECT_NUMBER = 'XXXXXXXXXXXXX';
// For iOS, open your project .pList file in xCode and add:
// 1) "Pushwoosh_APPID" key with the Pushwoosh App Id value
@marcandreappel
marcandreappel / ionic2-app.ts
Created July 18, 2016 08:13 — forked from EvanWillms/ionic2-app.ts
Ionic2 Pushwoosh app.ts sample
import {Componente} from '@angular/core';
import {Platform, ionicBootstrap} from 'ionic-angular';
import {PushwooshService} from './services/pushwoosh.service';
@Component({
template: '<ion-nav [root]="rootPage" #ionNav></ion-nav>',
})
export class MyApp {
constructor(private platform:Platform,

Keybase proof

I hereby claim:

  • I am marcandreappel on github.
  • I am marc_andre (https://keybase.io/marc_andre) on keybase.
  • I have a public key ASDdQQGvYkoMBTkkVtK9R6BQKNOkhGQ42exFy1yfBHjF4wo

To claim this, I am signing this object:

@marcandreappel
marcandreappel / xcode-auto-increment-build-number.md
Last active August 26, 2019 08:02 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build Number

Auto-increment build number in Xcode

Automatically increment the build number every time the project is compiled.

Usage

  • Select your target in your Xcode project
  • Select the Build Phases tab
  • Add a New Run Script Phase entry (via the + sign)
  • Copy the snippet below into the shell editor
@marcandreappel
marcandreappel / AppDelegate.swift
Created July 24, 2017 21:23 — forked from andreif/AppDelegate.swift
Example of UIPageViewController without storyboard i.e. created programmatically
// derived from https://www.veasoftware.com/posts/uipageviewcontroller-in-swift-xcode-62-ios-82-tutorial
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController()
@marcandreappel
marcandreappel / hmr-index.js
Created August 14, 2017 19:21 — forked from remy/hmr-index.js
A take on HMR. I don't remember exactly where it came from, but it works for me.
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import store from './store';
const rootEl = document.getElementById('root');
// Create a reusable render method that we can call more than once
let render = () => {
// Dynamically import our main App component, and render it
@marcandreappel
marcandreappel / Android auto increment build number
Created June 11, 2018 14:54
Android Studio auto increment build number for version code
# First create the file version.properties with value VERSION_BUILD=0
# In app/build.gradle:
android {
def versionPropsFile = file('version.properties')
def versionBuild
if (versionPropsFile.canRead()) {
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
@marcandreappel
marcandreappel / Xdebug_Valet_PHPStorm.md
Last active December 9, 2023 01:16
Xdebug on Valet with PHPStorm

Xdebug on Valet with PHPStorm

Installation

Install homebrew → https://brew.sh

Install beforehand NginX, MariaDB, DnsMasq and PHP7.2 with Composer

$ brew install php nginx mariadb dnsmasq composer