Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Coding

Amaan Kulshreshtha AmaanKulshreshtha

👨‍💻
Coding
Block or report user

Report or block AmaanKulshreshtha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AmaanKulshreshtha
AmaanKulshreshtha / handlebars.helpers.ifEquals.js
Created Apr 2, 2020 — forked from niksumeiko/handlebars.helpers.ifEquals.js
Handlebars.js templates engine custom IF condition helper. Allows to compare values one to each other like you are used to in programming.
View handlebars.helpers.ifEquals.js
// Compares first value to the second one allowing entering IF clouse if true.
// Otherwise entering ELSE clause if exist.
Handlebars.registerHelper('ifEquals', function(a, b, options) {
if (a === b) {
return options.fn(this);
}
return options.inverse(this);
});
View plopfile.ts
import { AddActionConfig, NodePlopAPI } from 'plop';
export default function(plop: NodePlopAPI) {
plop.setGenerator('common', {
description: 'add a common component',
prompts: [
{
type: 'input',
name: 'name',
message: 'common component name please'
@AmaanKulshreshtha
AmaanKulshreshtha / .eslintrc
Created Feb 3, 2020
Eslint config for react-native project
View .eslintrc
{
"extends": "react-native-wcandillon",
"rules": {
"quotes": ["error", "single"],
"react/jsx-indent": ["error", "tab"],
"prettier/prettier": [
"error",
{
"singleQuote": true,
"useTabs": true,
View plop-template-->index.styles.hbs
import styled from 'styled-components/native';
export const {{pascalCase name}}Container = styled.View``;
View plop-template-->index.hbs
import React from 'react';
import { {{ pascalCase name }}Container } from './index.styles';
export default {{ pascalCase name }} = () => {
return (
<{{ pascalCase name}}Container></{{ pascalCase name}}Container>
)
}
View plopfile.js
module.exports = function (plop) {
/** @type {import('plop').NodePlopAPI} */
plop.setGenerator('common', {
description: 'add a common component',
prompts: [{
type: 'input',
name: 'name',
message: 'common component name please'
}],
actions: [
View Branch Naming Conventions
wip Works in progress; stuff I know won't be finished soon
feat Feature I'm adding or expanding
bug Bug fix or experiment
junk Throwaway branch created to experiment
hotfix A hotfix branch
@AmaanKulshreshtha
AmaanKulshreshtha / Commit message Conventions
Last active Jul 8, 2019
commitMessageConventions.md
View Commit message Conventions
## FORMAT:
```
<type>[optional scope]: <description>
[optional body]
[optional footer]
```
View todo.json
[
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
},
{
"userId": 1,
"id": 2,
View user.json
[
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
You can’t perform that action at this time.