Skip to content

Instantly share code, notes, and snippets.

View mako34's full-sized avatar
💭
automagickally

manuelBetancurt mako34

💭
automagickally
View GitHub Profile
@mako34
mako34 / function.js
Created May 5, 2023 08:33 — forked from bcnzer/function.js
Example of how to perform a get, add and update using Cloud Firestore in a Function
// Make sure to use firebase-admin and to initialize the app
const admin = require('firebase-admin')
admin.initializeApp(functions.config().firebase)
// Example of how I'm GETTING all the records in a collection AND using
// the ID from the path of the document that triggered this function
exports.getLessonsAsync = functions.firestore
.document('organizations/{organizationId}/lessons/{lessonId}')
.onWrite(async function(change, context) {
const result = await admin
@mako34
mako34 / contracts...lolo.sol
Last active June 26, 2021 19:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.6+commit.11564f7e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract T3KN4RK1ST is ERC721URIStorage{
using Counters for Counters.Counter;
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
@mako34
mako34 / cloudSettings
Created March 5, 2021 00:11 — forked from marcelo-schroeder/History|-1001432a|entries.json
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-02-22T04:00:15.504Z","extensionVersion":"v3.4.3"}
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
// have 2 skype sessions running on mac
sudo /Applications/Skype.app/Contents/MacOS/Skype /secondary
const AWS = require("aws-sdk");
//security settings to use after advice from devOps will be CHANGED!!
AWS.config.update({
accessKeyId: 'accessKey###',
secretAccessKey: 'secretAccessKey###',
region: 'us-east-1'
});
const ses = new AWS.SES({ apiVersion: "2010-12-01" });
@mako34
mako34 / Presigned URL for s3
Created July 19, 2018 06:05
S3 create presigned URL
// const aws = require('aws-sdk');
const AWS = require('aws-sdk');
const fs = require('fs');
const s3 = new AWS.S3({
accessKeyId: 'AA',
secretAccessKey: 'BB+oeyjn8zGANuDyCIY',
region: 'ap-southeast-2'
// accessKeyId: process.env.AWS_ACCESS_KEY,
@mako34
mako34 / upload.js
Created July 18, 2018 07:40
node S3 upload
const fs = require('fs');
const AWS = require('aws-sdk');
const s3 = new AWS.S3({
accessKeyId: 'aaa',
secretAccessKey: 'bbb+oeyjn8zGANuDyCIY',
region: 'ap-southeast-2'
// accessKeyId: process.env.AWS_ACCESS_KEY,
// secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
@mako34
mako34 / okhttp3_async_droid.mk
Created June 23, 2017 02:22
android OKHTTP3 async GET
Log.d("mk", "chapas");
//call pelada
// final OkHttpClient client = new OkHttpClient();
//with stetho,
final OkHttpClient client = new OkHttpClient.Builder().addNetworkInterceptor(new StethoInterceptor()).build();
final Request request = new Request.Builder()
.url("http://www.mocky.io/v2/573336c90f0000902cead88d")