This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for repo in $(curl -s --header "PRIVATE-TOKEN: YOUR_TOKEN" "https://gitlab.com/api/v4/groups/YOUR_GROUP?include_subgroups=true&per_page=100" | jq -r ".projects[].http_url_to_repo"); do echo $repo; done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// strapi/api/${YourModel}/services/${YourModel} | |
const crypto = require('crypto'); | |
const redisClient = require('../../../cache/redis'); | |
const sendNotification = require('./notification'); | |
/** | |
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services) | |
* to customize this service | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// strapi/extensions/users-permissions/config/policies/permissions.js | |
const _ = require('lodash'); | |
const crypto = require('crypto'); | |
const redisClient = require('../../../../cache/redis'); | |
const handleErrors = (ctx, err = undefined, type) => { | |
throw strapi.errors[type](err); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'aws-amplify-react-native' { | |
const Amplify: any; | |
export default Amplify; | |
// *** UI *** | |
interface ITheme { | |
container: {}; | |
section: {}; | |
sectionHeader: {}; | |
sectionHeaderText: {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {HttpException, Injectable} from '@nestjs/common'; | |
import {google} from 'googleapis'; | |
import {GoogleApiService} from '../googleApi/googleApi.service'; | |
@Injectable() | |
export class GoogleSheetService { | |
constructor(private readonly googleApiService: GoogleApiService) {} | |
async readSheet(): Promise<any[]> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Body, Controller, Get, Post, Render} from '@nestjs/common'; | |
import {GoogleApiService} from './googleApi.service'; | |
@Controller() | |
export class GoogleApiController { | |
constructor(private readonly service: GoogleApiService) {} | |
@Get('authorize') | |
@Render('main') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {HttpException, Injectable} from '@nestjs/common'; | |
import {Credentials, OAuth2Client} from 'google-auth-library'; | |
import {google} from 'googleapis'; | |
import _ from 'lodash'; | |
import fs from 'fs'; | |
import util from 'util'; | |
import credentialsJson from '../../../credentials.json'; | |
import {IGoogleToken} from './googleToken.interface'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Auth} from 'aws-amplify'; | |
import AsyncStorage from '@react-native-community/async-storage'; | |
import {ICognitoStorage} from 'amazon-cognito-identity-js'; | |
const MEMORY_KEY_PREFIX = '@fcAuth:'; | |
let dataMemory = {}; | |
const syncPromise: Promise<any> = null; | |
/** | |
* This is used to set a specific item in storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
export const getSignedURL = async ( | |
url: string, | |
file: File | |
): Promise<{ fileName: string; s3Url: string }> => { | |
try { | |
const endpoint = url; | |
const payload = { | |
filePath: file.name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<dropzone | |
ref="product-image" | |
v-model="tempProductData.image" | |
:label="$t('table.image')" | |
:signed-api="signedAPIRequest" | |
/> | |
<el-button @click="uploadImage">Upload</el-button> |
NewerOlder