Skip to content

Instantly share code, notes, and snippets.

View sahil290791's full-sized avatar
🏠
Working from home

Sahil Prajapati sahil290791

🏠
Working from home
View GitHub Profile
#!/bin/bash
if ! yarn check --integrity 2>&1 | grep -q 'success'; then
echo "Run yarn install";
exit 125;
fi
cache-node-modules:
<<: *node-runner
stage: build
image: sahil290791/node_10_git:0.0.1
variables:
GIT_DEPTH: 1
before_script:
- node -v
script:
- yarn install --frozen-lockfile
cache-node-modules:
<<: *node-runner
stage: build
image: sahil290791/node_10_git:0.0.1
variables:
GIT_DEPTH: 1
before_script:
- node -v
script:
- yarn install --frozen-lockfile
lint:
<<: *node-runner
<<: *feature-branches
stage: build
image: sahil290791/node_10_git:0.0.1
variables:
GIT_DEPTH: ''
cache:
key: yarn-cache-master
paths:
import s3 from 's3';
import AWS from 'aws-sdk';
import chalk from 'chalk';
// import config
const s3Config = {
localDir: config.ASSETS_LOCAL_FOLDER_SRC,
deleteRemoved: false,
s3Params: {
Bucket: config.S3_BUCKET,
Prefix: '',
from __future__ import print_function
import urllib
import zipfile
import boto3
import io
import mimetypes
print('Loading function')
s3 = boto3.client('s3')
bucket = 'test-bucket-node'
def lambda_handler(event, context):
@sahil290791
sahil290791 / gitlab-ci.yml
Last active July 7, 2020 07:39
Older Gitlab ci lint
stages:
- lint
- test
- build
- deploy
.feature-branches: &feature-branches
only:
- /^feature\/.*$/
- /^hotfix\/.*$/

Keybase proof

I hereby claim:

  • I am sahil290791 on github.
  • I am sahil290791 (https://keybase.io/sahil290791) on keybase.
  • I have a public key ASD3H6tB1OtFh17g7Gzc_3px27KTJ0JwpuBzsgsOO5TyiQo

To claim this, I am signing this object:

@sahil290791
sahil290791 / Api.js
Last active May 5, 2019 16:02
Api.js
import API from './BaseAPI';
export default {
bookItem(key, data, options = {}) {
const path = '/createItems.json';
API.makePostRequest(path, key, data, options);
},
createUserDetails(key, userData, userId, options = {}) {
const path = `/users/${userId}.json`;
@sahil290791
sahil290791 / BaseApi.js
Last active September 12, 2022 16:26
BaseApi.js
const NO_CONTENT = 204;
const UNAUTHORIZED = 401;
const _pendingRequests = {};
const abortPendingRequests = (key) => {
if (_pendingRequests[key]) {
_pendingRequests[key]('REQUEST_CANCELLED');
_pendingRequests[key] = null;
}