Skip to content

Instantly share code, notes, and snippets.

View AravinthVelusamy's full-sized avatar
🎯
Focusing

Aravinth Velusamy AravinthVelusamy

🎯
Focusing
View GitHub Profile
@AravinthVelusamy
AravinthVelusamy / distortion.dart
Created March 18, 2021 03:39 — forked from wilsonowilson/distortion.dart
Widget warping and distortion in Flutter
import 'dart:typed_data';
import 'dart:ui' hide Image;
import 'package:image/image.dart' as img_lib;
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
enum ImageFetchState { initial, fetching, fetched }
class ImagePlayground extends StatefulWidget {
//@version=3
//
// Pivot Points High Low Extension
//
// See Also:
// - A Simple 1-2-3 Method for Trading Forex <http://webinar.tradingpub.com/resources/lp/tpub_topshelf/Top_Shelf_Magazine/forex/A_Simple_1_2_3_Method_for_Trading_Forex.php>
// - The Classic 1-2-3 Pattern: An Underestimated Powerhouse <https://www.tradeciety.com/the-classic-1-2-3-pattern-underestimated-powerhouse/>
// - Bulkowski's 1-2-3 Trend Change <http://thepatternsite.com/123tc.html>
//
//
@AravinthVelusamy
AravinthVelusamy / Pivot Points, by @juanmirocks.js
Created January 22, 2020 16:22 — forked from juanmirocks/Pivot Points, by @juanmirocks.js
Pine Script for a TradingView indicator: Pivot Points
// @version=3
//
// Pivot Points indicator, calculated in the "traditional" way, also called "floor-trader pivots".
//
// Additionally, and optional to the user, the halves between the key levels are also shown.
//
// The Default chosen Time Frame to calculate the pivot points is:
// Daily (D) if within intraday
// Weekly (W) if within daily chart
// Monthly (M) if within weekly chart
@AravinthVelusamy
AravinthVelusamy / postgres-cheatsheet.md
Created December 10, 2019 08:44 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@AravinthVelusamy
AravinthVelusamy / build.gradle
Created August 2, 2019 05:52 — forked from albinmathew/build.gradle
An example configuration for proguard-rules.pro
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "com.abc.example"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
@AravinthVelusamy
AravinthVelusamy / build.gradle
Created August 2, 2019 05:52 — forked from albinmathew/build.gradle
An example configuration for proguard-rules.pro
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "com.abc.example"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
@AravinthVelusamy
AravinthVelusamy / LoadMoreAdapter.java
Created June 14, 2019 10:16 — forked from talenguyen/LoadMoreAdapter.java
Implementation of Load More feature for RecyclerView
import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
public abstract class LoadMoreAdapter<T>
extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
public static final int VIEW_TYPE_LOAD_MORE = 1;
@AravinthVelusamy
AravinthVelusamy / MyVideoRecyclerViewAdapter.java
Created January 6, 2019 15:38 — forked from shubhubhosale/MyVideoRecyclerViewAdapter.java
Android AutoPlay Videos in RecyclerView like Instagram using SimpleVideoView and
package pune.university.engineering.gifutilstest;
import android.content.Context;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
@AravinthVelusamy
AravinthVelusamy / QRCode.java
Created December 19, 2018 14:50 — forked from harshildarji/QRCode.java
Generating QR code in Android.
...
String QRcode = "...";
new generateQrcode(qrcodeImageview).execute(QRcode);
...
private class generateQrcode extends AsyncTask<String, Void, Bitmap> {
public final static int WIDTH = 400;
ImageView bmImage;
public generateQrcode(ImageView bmImage) {
this.bmImage = bmImage;
@AravinthVelusamy
AravinthVelusamy / activity_main.xml
Created December 1, 2018 16:48 — forked from udacityandroid/activity_main.xml
Android for Beginners : Quantity Picker Button Style Solution
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"