Skip to content

Instantly share code, notes, and snippets.

View Henriquedn's full-sized avatar
💻
<coding />

Henry Maina Henriquedn

💻
<coding />
View GitHub Profile
@kresnasatya
kresnasatya / Authenticate.php
Last active March 14, 2024 12:07
Fixed problem Laravel Passport doesn't redirect back to authorization form after login
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
@AmreeshTyagi
AmreeshTyagi / workbench-ui-fix.sh
Last active April 20, 2024 19:05
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(home: new FrostedDemo()));
}
class FrostedDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
@chetangani
chetangani / RecyclerItemClickListener.java
Created July 10, 2016 05:50
Recycler View implementing OnItemTouchListener
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
private OnItemClickListener mListener;
public interface OnItemClickListener {
@mannodermaus
mannodermaus / CompatTextView.java
Last active August 30, 2018 09:59
Custom TextView implementation to allow VectorDrawableCompat to work with compound Drawables
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.AppCompatDrawableManager;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
@sheharyarn
sheharyarn / CardSwingAnimations.md
Last active March 16, 2021 08:04
Swing Animations for CardViews in Android

SwingUp Animations for Android

I use these snippets to implement Google Now Card appear-animations on Android. Add these two files to your res/anim/ folder and add a swing_anim_time integer to your values:

<!-- res/values/strings.xml -->
<integer name="swing_anim_time">750</integer>