Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Marc-André Appel marcandreappel

🎯
Focusing
Block or report user

Report or block marcandreappel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marcandreappel
marcandreappel / dbox.sh
Last active Oct 21, 2019
Devilbox start & restart script
View dbox.sh
#!/usr/bin/env sh
# See here first: https://github.com/marcandreappel/xdebug-devilbox-phpstorm-postman
cd /home/$USER/.devilbox/
docker-compose stop
docker-compose rm -f
docker-compose pull
@marcandreappel
marcandreappel / xdebug_devilbox_phpstorm_postman.md
Last active Oct 21, 2019 — forked from yannbertrand/using_xdebug_with_postman.md
Using Xdebug on Devilbox with PhpStorm and Postman
View xdebug_devilbox_phpstorm_postman.md

The tutorial got a new home, head over to the newly created repo (for more flexibility and better interaction).

@marcandreappel
marcandreappel / PeekingLinearLayoutManager.kt
Created Jun 16, 2019 — forked from bolot/PeekingLinearLayoutManager.kt
LinearLayoutManager subclass that "peeks", shows a portion of the adjacent child views.
View PeekingLinearLayoutManager.kt
class PeekingLinearLayoutManager : LinearLayoutManager {
@Suppress("Unused")
@JvmOverloads
constructor(context: Context?, @RecyclerView.Orientation orientation: Int = RecyclerView.VERTICAL, reverseLayout: Boolean = false) : super(context, orientation, reverseLayout)
@Suppress("Unused")
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
override fun generateDefaultLayoutParams() =
scaledLayoutParams(super.generateDefaultLayoutParams())
View ubuntu-php-development-environment.md

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

@marcandreappel
marcandreappel / Xdebug_Valet_PHPStorm.md
Last active Jul 2, 2019
Xdebug on Valet with PHPStorm
View Xdebug_Valet_PHPStorm.md

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
@marcandreappel
marcandreappel / Android auto increment build number
Created Jun 11, 2018
Android Studio auto increment build number for version code
View Android auto increment build number
# 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 / hmr-index.js
Created Aug 14, 2017 — forked from remy/hmr-index.js
A take on HMR. I don't remember exactly where it came from, but it works for me.
View hmr-index.js
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 / AppDelegate.swift
Created Jul 24, 2017 — forked from andreif/AppDelegate.swift
Example of UIPageViewController without storyboard i.e. created programmatically
View AppDelegate.swift
// 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 / xcode-auto-increment-build-number.md
Last active Aug 26, 2019 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build Number
View xcode-auto-increment-build-number.md

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
View keybase.md

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:

You can’t perform that action at this time.