Skip to content

Instantly share code, notes, and snippets.

View shriomtri's full-sized avatar

Shriom shriomtri

View GitHub Profile
@shriomtri
shriomtri / Enum.sol
Last active November 10, 2022 05:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Enum {
enum Status {
Pending,
Shipped,
Accepted,
Rejected,
@shriomtri
shriomtri / userAvatar.js
Created June 29, 2021 08:18 — forked from SylarRuby/userAvatar.js
NodeJs AWS S3 Upload
/**
* This gist was inspired from https://gist.github.com/homam/8646090 which I wanted to work when uploading an image from
* a base64 string.
* Updated to use Promise (bluebird)
* Web: https://mayneweb.com
*
* @param {string} base64 Data
* @return {string} Image url
*/
const imageUpload = async (base64) => {
import java.io.Serializable;
public class ContactModel implements Serializable{
private String name;
private String email;
private String phone;
public ContactModel(String name, String email, String phone) {
this.name = name;
@shriomtri
shriomtri / ContactHelper.java
Last active July 16, 2019 09:57
This helper class allow to fetch the list of all contact in android phone. It allow user to searh list of contact from name (query) as input.
package com.beatme.app.util;
import android.content.Context;
import android.database.Cursor;
import android.provider.ContactsContract;
import com.beatme.app.service.model.ContactModel;
import java.util.ArrayList;
import java.util.List;