Apps used: Cursor.so / github copilot chat / Amazon Q / codeium
Source + website, updated for Laravel 10
- make:cast Create a new custom Eloquent cast class
- make:channel Create a new channel class
- make:command Create a new Artisan command
- make:component Create a new view component class
- make:controller Create a new controller class
- make:event Create a new event class
- make:exception Create a new custom exception class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.arekolek.diffutil | |
import android.arch.lifecycle.* | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.support.v7.util.DiffUtil | |
import android.support.v7.widget.RecyclerView | |
import android.util.Log | |
import android.view.LayoutInflater | |
import android.view.View |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.SuppressLint | |
import okhttp3.OkHttpClient | |
import java.security.cert.CertificateException | |
import javax.net.ssl.SSLContext | |
import javax.net.ssl.TrustManager | |
import javax.net.ssl.X509TrustManager | |
object UnsafeOkHttpClient { | |
fun Builder(): OkHttpClient.Builder { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
from PIL import Image # https://pillow.readthedocs.io/en/4.3.x/ | |
import requests # http://docs.python-requests.org/en/master/ | |
# example image url: https://m.media-amazon.com/images/S/aplus-media/vc/6a9569ab-cb8e-46d9-8aea-a7022e58c74a.jpg | |
def download_image(url, image_file_path): | |
r = requests.get(url, timeout=4.0) | |
if r.status_code != requests.codes.ok: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NotificationUtils extends ContextWrapper { | |
public static final String ANDROID_CHANNEL_ID = "com.androidstuff.tutsplustalerts.ANDROID"; | |
public static final String IOS_CHANNEL_ID = "com.androidstuff.tutsplustalerts.IOS"; | |
public static final String ANDROID_CHANNEL_NAME = "ANDROID CHANNEL"; | |
public static final String IOS_CHANNEL_NAME = "IOS CHANNEL"; | |
private NotificationManager notificationManager; | |
//.. | |
public NotificationUtils(Context base) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinmegali.daggerwithkotlin.room | |
import android.arch.lifecycle.LiveData | |
import android.arch.lifecycle.Observer | |
import java.util.concurrent.CountDownLatch | |
import java.util.concurrent.TimeUnit | |
// Extension to allow unit tests on LiveData | |
// discussion on: https://stackoverflow.com/questions/44270688/unit-testing-room-and-livedata |
NewerOlder