Skip to content

Instantly share code, notes, and snippets.

View ianrodrigues's full-sized avatar

Ian Rodrigues ianrodrigues

View GitHub Profile
import { client } from '~/services/api.server';
import { getAccessToken } from '~/services/session.server';
import { Team } from './types';
export const getTeam = async (
request: Request,
{ teamId }: { teamId: string }
): Promise<Team> => {
const { data } = await client.get(`/teams/${teamId}`, {
@ianrodrigues
ianrodrigues / cleanup.py
Created June 16, 2021 17:02 — forked from luhn/cleanup.py
An AWS Lambda function to delete old AMIs.
"""
Code adapted from and inspired by http://blog.ranman.org/cleaning-up-aws-with-boto3/.
"""
import os
import re
from datetime import datetime, timedelta
import boto3
# Here you define the stages of your pipeline.
# more info: https://docs.gitlab.com/ee/ci/yaml/#stages
stages:
- build
- deploy
# Here you define top-level cache.
# In this case, I'm caching the node_modules/ folder, so next you run "yarn install" it won't take too much time.
# more info: https://docs.gitlab.com/ee/ci/yaml/#cache
cache:
@ianrodrigues
ianrodrigues / jwtRS256.sh
Created January 1, 2021 13:35 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@ianrodrigues
ianrodrigues / cf_create_or_update.py
Created November 19, 2020 01:17 — forked from svrist/cf_create_or_update.py
Update or create a CloudFormation stack given a name and template + params'
'Update or create a stack given a name and template + params'
from __future__ import division, print_function, unicode_literals
from datetime import datetime
import logging
import json
import sys
import boto3
import botocore

Keybase proof

I hereby claim:

  • I am ianrodrigues on github.
  • I am ianrodrigues (https://keybase.io/ianrodrigues) on keybase.
  • I have a public key whose fingerprint is 8FB9 336F D179 D31B 796E 53A4 7A15 777D 1BC4 F883

To claim this, I am signing this object:

@ianrodrigues
ianrodrigues / bash_curl_loop
Created June 22, 2020 16:04 — forked from ceme/bash_curl_loop
bash curl loop
while true; do sleep 1; curl http://www.google.com; echo -e '\n\n\n\n'$(date);done
public function addPhoneNumber(string $phone): void {}
@ianrodrigues
ianrodrigues / Schema.graphql
Created April 24, 2020 19:30 — forked from ThisIsMissEm/Schema.graphql
Form Validation as a Result Union
mutation updateUser(
details: UpdateUserInput!
): UpdateUserResult
union UpdateUserResult =
UpdateUserSuccess |
FormValidationError
type UpdateUserSuccess {}
version: '3'
services:
app:
build: .
image: symfony-fargate
ports:
- 8080:80
volumes:
- .:/var/www/html