Skip to content

Instantly share code, notes, and snippets.

import androidx.compose.ui.graphics.Color
// reds
val md_red_50 = Color(0xFFFFEBEE)
val md_red_100 = Color(0xFFFFCDD2)
val md_red_200 = Color(0xFFEF9A9A)
val md_red_300 = Color(0xFFE57373)
val md_red_400 = Color(0xFFEF5350)
val md_red_500 = Color(0xFFF44336)
val md_red_600 = Color(0xFFE53935)
@smartherd
smartherd / DraggableCoordinatorLayout.kt
Last active March 29, 2023 09:14
Android Draggable MaterialCardView
package com.sriyank.mdccomponents
import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import android.view.View
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.customview.widget.ViewDragHelper
import java.util.*
@rmiyazaki6499
rmiyazaki6499 / deploy-mern.md
Last active February 24, 2024 05:44
Deploying a Production ready React-Express app on AWS EC2 with CI/CD

Deploying a Production ready React-Express app on AWS

In this tutorial, I will be going over to how to deploy a Javascript app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app AlgoAcademy (a resource for reviewing algorithms and data structures) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • A React frontend, Express backend
  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
@aVolpe
aVolpe / EmbeddedGist.js
Created September 13, 2016 22:58
EmbeddedGist allows a gist to be embedded in a React application
import React, { Component } from 'react';
class EmbeddedGist extends Component {
constructor(props) {
super(props);
this.gist = props.gist;
this.file = props.file;
this.stylesheetAdded = false;
this.state = {
@jagneshchawla
jagneshchawla / android-common-utility.java
Created June 16, 2016 16:39
Android common utility functions which can be used in any app. Single file with max utilities.
package helpers;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;