I hereby claim:
- I am afzalive on github.
- I am afzal (https://keybase.io/afzal) on keybase.
- I have a public key ASCEiRXUkvJrKqp2vh1X3N1jI9nKfF_liHnizkJSvnZFPAo
To claim this, I am signing this object:
$testuser = new User; | |
$testuser->username = 'testuser'; | |
$testuser->email = 'test@vv.api'; | |
$testuser->password = 'test'; | |
$testuser->first_name = 'Harry'; | |
$testuser->last_name = 'Potter'; | |
$testuser->confirmed = 1; | |
$testuser->save(); |
<?php | |
// Other methods go here | |
// Auth filter | |
Route::filter('auth', function() | |
{ | |
if (\League\OAuth2\Server\Util\Request::buildFromGlobals()->header('Authorization')) { | |
// TODO DOES NOT WORK!!! | |
return Route::filter('oauth', 'LucaDegasperi\OAuth2Server\Filters\OAuthFilter'); | |
} else { |
/* | |
* Copyright (C) 2007 The Guava Authors | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
#Android and CI and Gradle (A How-To) | |
There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
The Android platform is not one of them. | |
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
But fear not! It can be done! | |
Before we embark on our journey, you'll need a few things to run locally: |
public class BottomSheetView extends NestedScrollView { | |
private BottomSheetBehavior bottomSheetBehavior; | |
private RecyclerView devicesListV; | |
public BottomSheetView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
LayoutInflater.from(context).inflate(R.layout.bottom_sheet_view, this, true); |
import com.azimolabs.conditionwatcher.Instruction; | |
import org.junit.Assume; | |
import org.junit.rules.TestRule; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.Statement; | |
import timber.log.Timber; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; |
public class LocaleChanger { | |
public static void setLocale(ArrayList<Locale> arrayList) { | |
try { | |
Class cls = Class.forName("android.app.ActivityManagerNative"); | |
Method method = cls.getMethod("getDefault", new Class[0]); | |
method.setAccessible(true); | |
Object invoke = method.invoke(cls, new Object[0]); | |
method = cls.getMethod("getConfiguration", new Class[0]); | |
method.setAccessible(true); |
/** | |
* Constructs a ViewModelFactory with dependencies | |
*/ | |
@Singleton | |
class ViewModelFactory @Inject constructor( | |
private val creators: Map<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>> | |
) : ViewModelProvider.Factory { | |
override fun <T : ViewModel> create(modelClass: Class<T>): T { | |
var creator = creators[modelClass] |
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/Android\ Studio.app | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
I hereby claim:
To claim this, I am signing this object: