Skip to content

Instantly share code, notes, and snippets.

View arnold-almeida's full-sized avatar
💀
Based

Arnold A arnold-almeida

💀
Based
View GitHub Profile
@Zate
Zate / iam.tf
Created May 12, 2020 22:16
terraform Service Specific Credential with IAM user
locals {
ssc = jsondecode(data.local_file.ssc-output.content)
}
resource "aws_iam_user" "repo" {
name = "${var.origin}-${var.env}-codecommit-user"
path = "/${var.app}/${var.env}/"
@erin-koen
erin-koen / MelonBot.ts
Last active February 27, 2021 16:24
The Melon Fund Uniswap Bot
export class UniswapBot {
public static async create(hubAddress: string, tokenOneSymbol: string, tokenTwoSymbol: string) {
const environment = createEnvironment();
const hub = new Hub(environment, hubAddress);
const routes = await hub.getRoutes();
const manager = await hub.getManager();
const account = (await environment.client.getAccounts())[0];
@ketzacoatl
ketzacoatl / README.md
Created September 11, 2017 20:37
Simple Terraform demo on how to use AWS ALB with multiple apps and host header with different names / FQDN

This is the common component:

# Create a single load balancer for all Atlassian services
resource "aws_alb" "atlassian" {
  name            = "${var.name}"
  internal        = false
  idle_timeout    = "300"
  security_groups = [ 
 "${aws_security_group.atlassian-alb.id}",
@MacHu-GWU
MacHu-GWU / inspect_mate.py
Created May 9, 2017 20:34
``inspect_mate`` provides more methods to get information about class attribute than the standard library ``inspect``.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
``inspect_mate`` provides more methods to get information about class attribute
than the standard library ``inspect``.
This module is Python2/3 compatible, tested under Py2.7, 3.3, 3.4, 3.5, 3.6.
Includes tester function to check:

Raise Open File Limits in OS X

in OS X 10.4 to macOS sierra 10.12 and maybe higher!

Create Launcher Script:

/Library/LaunchDaemons/limit.maxfiles.plist

Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:

@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@philsturgeon
philsturgeon / Syntax Examples.md
Last active December 22, 2015 02:39
PHP Named Param History

Example A

Inside the function declaration all values are assigned to variables, so using variable syntax on the outside seems to make sense too.

$api->getFriends($screen_name = 'phpdrama', $include_user_entities = true);

Pro:

:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@roncioso
roncioso / 20thingsilearned.js
Created November 18, 2010 22:16
20thingsilearned.com - Nice to study. Original here http://www.20thingsilearned.com/js/twentythings.min.js
/*
Nice to study. Original here http://www.20thingsilearned.com/js/twentythings.min.js
*/
var TT = TT || {};
TT.PAGE_WIDTH = 800;
TT.PAGE_HEIGHT = 500;
TT.PAGE_MIN_WIDTH = 1000;
TT.PAGE_MIN_HEIGHT = 680;
TT.PAGE_MARGIN_LEFT = 32;
@onyxfish
onyxfish / elections.chicagotribune.com.vcl
Created November 3, 2010 18:55
Elections Center Varnish Configuration File
backend app1 {
.host = "1.1.1.1";
.port = "80";
}
backend app2 {
.host = "2.2.2.2";
.port = "80";
}