Skip to content

Instantly share code, notes, and snippets.

View frangeris's full-sized avatar
👀

Frangeris Peguero frangeris

👀
  • Cloud(x);
  • Buenos Aires
  • 15:20 (UTC -03:00)
View GitHub Profile
@DavidWells
DavidWells / serverless.yml
Created December 24, 2017 20:56 — forked from jscattergood/serverless.yml
Creating a custom serverless resource for subscribing to SNS topics in another region
# Welcome to Serverless!
#
# Happy Coding!
service: cross-region-sns-subscriber
# Keep environment specific configurations in separate files
custom: ${file(config/${env:STAGE}.json)}
provider:
@megahertz
megahertz / MobxRnnProvider.js
Last active January 11, 2020 09:56
This is a provider which allows to use mobx-react Provider with wix/react-native-navigation.
import { Provider } from 'mobx-react/native';
const SPECIAL_REACT_KEYS = { children: true, key: true, ref: true };
export default class MobxRnnProvider extends Provider {
props: {
store: Object
};
context: {
@satya164
satya164 / MainActivity.java
Last active December 2, 2016 20:03
react-native-fbsdk in React Native 0.29.+
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "MyApp";
}

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
@cmawhorter
cmawhorter / troubleshooting.md
Last active February 28, 2024 16:28
Solution to AWS Lambda node.js UnrecognizedClientException "The security token included in the request is invalid."

Troubleshooting AWS unauthorized errors in lambda requests

This is mainly for node.js but might apply to other environments. Unsure.

If you are running a AWS Lambda function that calls another AWS service and getting an error about invalid tokens or other access denied errors, do this:

Check IAM

The role assigned to your lambda function will need permission to perform the actions. Check IAM and make sure the role has all the permissions.

@davideast
davideast / push.js
Last active April 20, 2021 17:19
Send push notifications with node-apn and Firebase
var apn = require("apn");
var Firebase = require("firebase");
var service = new apn.connection({ production: false }); // true for production pipeline
// Create a reference to the push notification queue
var pushRef = new Firebase("<your-firebase>.firebaseio.com/notificationQueue");
// listen for items added to the queue
pushRef.on("child_added", function(snapshot) {
@rmoff
rmoff / gist:379e6ce46eb128110f38
Last active August 14, 2020 18:39
Kibana 3 and Elasticsearch 1.4 - CORS problem

Kibana 3 against ElasticSearch 1.4 throws an Connection Failed screen. The error text says to set http.cors.allow-origin, but it misses out the important http.cors.enabled: true

Working config:

$ grep cors elasticsearch-1.4.0.Beta1/config/elasticsearch.yml
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
@fragoulis
fragoulis / unaccent.rules
Last active June 10, 2022 11:19
Postgres unaccent rules for greek characters
À A
Á A
 A
à A
Ä A
Å A
Æ A
à a
á a
â a
@frangeris
frangeris / commands.md
Last active December 6, 2021 20:15
Common git commands

Common git commands

This is a list of useful commands for git for fast search and ops developers, enjoy and comments for suggest all welcomes :D


Public repo .tar for download versions: https://www.kernel.org/pub/software/scm/git/

@teohm
teohm / learn-dynamodb.md
Last active July 31, 2021 09:55
personal reading notes about DynamoDB tips & gotcahs

Disclaimer: I'm super new to DynamoDB, so if you found I wrote something incorrect or stupid, just kindly send me a comment :)


Learn DynamoDB

  • database -> tables -> items -> attributes
  • db = a collection of tables