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
@bolot
bolot / PeekingLinearLayoutManager.kt
Last active Jun 16, 2019
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())
@remy
remy / hmr-index.js
Created Jun 1, 2017
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
@ccjeng
ccjeng / CustomInfoWindowAdapter.java
Last active Jun 13, 2019
Custom InfoWindow Layout for Google Map in Android
View CustomInfoWindowAdapter.java
public class CustomInfoWindowAdapter implements GoogleMap.InfoWindowAdapter {
private Activity context;
public CustomInfoWindowAdapter(Activity context){
this.context = context;
}
@Override
View iOS.8.3.txt
UIFont: family Thonburi
UIFont: font Thonburi-Bold
UIFont: font Thonburi
UIFont: font Thonburi-Light
UIFont: family Khmer Sangam MN
UIFont: font KhmerSangamMN
UIFont: family Snell Roundhand
UIFont: font SnellRoundhand-Black
UIFont: font SnellRoundhand-Bold
UIFont: font SnellRoundhand
@beanmoss
beanmoss / RestControllerTrait.php
Created Apr 18, 2015
Playing with Laravel Lumen: simple RESTful trait.
View RestControllerTrait.php
<?php namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait
{
public function index()
{
$m = self::MODEL;
return $this->listResponse($m::all());
@huglester
huglester / gist:3860656
Created Oct 9, 2012
FuelPHP PHPStorm helper class
View gist:3860656
<?php
class Agent extends Fuel\Core\Agent {}
class Arr extends Fuel\Core\Arr {}
class Asset extends Fuel\Core\Asset {}
class Cache extends Fuel\Core\Cache {}
class CacheNotFoundException extends Fuel\Core\CacheNotFoundException {}
class CacheExpiredException extends Fuel\Core\CacheExpiredException {}
class Cli extends Fuel\Core\Cli {}
class Config extends Fuel\Core\Config {}
@uriel1998
uriel1998 / volume.rb
Created Feb 10, 2012 — forked from jaspervdj/volume.rb
Set PulseAudio volume, mute, unmute, and change default sink (and automagically switch running audio streams) from the commandline
View volume.rb
#!/usr/bin/ruby
#
# Moved to: https://github.com/uriel1998/volumerb
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-sa/3.0/.
#
# Forked/derived from original by Jasper Van der Jeugt (jaspervdj);
@marcandreappel
marcandreappel / states_provinces.php
Created Aug 29, 2011
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
View states_provinces.php
<?
/**
* @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
*/
/**
You can’t perform that action at this time.