Skip to content

Instantly share code, notes, and snippets.

View vemarav's full-sized avatar
👨‍💻
Productive

Aravind Vemula vemarav

👨‍💻
Productive
View GitHub Profile
@vemarav
vemarav / share-urls.md
Created March 23, 2021 18:30 — forked from apisandipas/share-urls.md
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@vemarav
vemarav / git-aware-bash-prompt.md
Created January 2, 2021 07:00 — forked from eliotsykes/git-aware-bash-prompt.md
Git Aware Bash Prompt
@vemarav
vemarav / home_page.dart
Last active November 10, 2020 06:19
Flutter Authentication Flow
import 'dart:async';
import 'package:auth_flow/app/utils/auth_utils.dart';
import 'package:auth_flow/app/utils/network_utils.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
class HomePage extends StatefulWidget {
static final String routeName = 'home';
@override
@vemarav
vemarav / background-timer.js
Last active October 29, 2020 00:26
solution for BackgroundTimer setInverval not working in app background
// file: ./BackgroundTimer.js
import { DeviceEventEmitter, NativeAppEventEmitter, Platform } from 'react-native';
import _BackgroundTimer from 'react-native-background-timer'; // v2.1.1
const EventEmitter = Platform.select({
ios: () => NativeAppEventEmitter,
android: () => DeviceEventEmitter,
})();
class BackgroundTimer {
@vemarav
vemarav / console.js
Last active October 22, 2020 03:21
Build rails like console in nodejs
/**
* add console.js at ther root of your app
* Modify to make it more helpful for your project
* > Note: `esm` adds ES6 support in Node
* In package.json
* ...
* "scripts": {
* "start": "nodemon -r esm ./server.js"
* "console": "node -r esm --experimental-repl-await console",
* }
{
"compilerOptions": {
/* Basic Options */
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"lib": [
"esnext",
"dom"
] /* Specify library files to be included in the compilation. */,
// "allowJs": true, /* Allow javascript files to be compiled. */
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
import {AppRegistry} from 'react-native'
import {name as appName} from './app.json'
import App from './App'
AppRegistry.registerComponent(appName, () => App)
AppRegistry.runApplication(appName, {
initialProps: {},
rootTag: document.getElementById('app-root'),
})
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const rootDir = path.join(__dirname, '..');
const webpackEnv = process.env.NODE_ENV || 'development';
module.exports = {
mode: webpackEnv,
entry: {
app: path.join(rootDir, './index.web.ts'),
@vemarav
vemarav / App.tsx
Last active November 3, 2019 19:09
import React from 'react';
import {Dimensions, StyleSheet, Text, View} from 'react-native';
const {height} = Dimensions.get('screen');
const App = () => {
return (
<View style={styles.container}>
<View style={styles.center}>
<Text>Hello React Native Web!!!</Text>