Skip to content

Instantly share code, notes, and snippets.

View felicianotech's full-sized avatar

Ricardo N Feliciano felicianotech

View GitHub Profile
@felicianotech
felicianotech / rename-go-module.sh
Created April 9, 2024 18:47
A small script to rename a Go module and its import statements through out the source code.
#!/usr/bin/env bash
# Run this script as:
# ./rename-go-module.sh example.com/old/module example.com/new-module
go mod edit -module "${2}"
find . -type f -name '*.go' -exec sed -i -e "s,\"${1}/,\"${2}/,g" {} \;
find . -type f -name '*.go' -exec sed -i -e "s,\"${1}\",\"${2}\",g" {} \;
steps:
- restore_cache:
keys:
- gatsby-build-v1-{{ .Branch }}-
- run:
environment:
DATA_SOURCE_URL: << parameters.data-source-url >>
name: Gatsby Build (incremental)
# yarn or npm uses the same scripts section at package.json
# we are safe to use this command as main execution
@felicianotech
felicianotech / gist:e81d86c0ef69524562ed2c1ff9c2d84b
Created December 19, 2019 16:27
Packages installed in cimg/go:1.13.4
----Main-----
- Go v1.13.4
- GoTestSum v0.4.0
-----Apt-----
NAME VERSION SIZE
-adduser 3.116ubuntu1 624K
-apparmor 2.12-4ubuntu5.1 1.8M
@felicianotech
felicianotech / cci-node-multiversion-after-example.yml
Created November 16, 2018 15:05
An example CircleCI 2.1 config building with multiple versions of Node.js.
version: 2.1
workflows:
main:
jobs:
- unit-tests:
version: 6
- unit-tests:
version: 8
- unit-tests:
@felicianotech
felicianotech / cci-node-multiversion-before-example.yml
Created November 16, 2018 14:54
An example CircleCI 2.0 config building with multiple versions of Node.js.
workflows:
version: 2
main:
jobs:
- unit-node6
- unit-node8
- unit-node10
- lint
- integration
- ui
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
@felicianotech
felicianotech / gist:2a558f1e0e365d445d6ffb5e38b9455c
Created April 30, 2018 18:15
CircleCI Go Project Config Sample
workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
@felicianotech
felicianotech / gist:56ad8f63156e233e6a16df50fe6d4791
Created August 22, 2017 23:02
Using AWS ECR with CircleCI 2.0 (docker executor)
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:8-jdk
steps:
- checkout
- setup_remote_docker
- run:
name: install aws
@felicianotech
felicianotech / newer-go-on-circle-example.txt
Created November 14, 2016 21:52
An example of how to use Go versions newer than v1.6.2 on CircleCI.
machine:
environment:
GODIST: "go1.7.3.linux-amd64.tar.gz"
post:
- mkdir -p downloads
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
@felicianotech
felicianotech / .ciignore
Created June 15, 2016 04:51
An example Git hook to automate when to use [skip ci] in commit messages. This particular hook uses patterns from a file called .ciignore
logs/*