Skip to content

Instantly share code, notes, and snippets.

View matisnape's full-sized avatar

Anna Anks Nowak matisnape

View GitHub Profile

Install Go using asdf for Visual Studio Code on macOS

I had a lot of issues trying to install Golang on macOS using asdf package manager to develop on Visual Studio Code.

So here's the steps needed to setup it properly:

Open Terminal and install asdf with this command:

You have to install Homebrew before running the installation command.

@skipcloud
skipcloud / rerere.md
Created February 7, 2020 09:15
Using git's rerere feature to escape recurring conflict hell

Have you ever tried to merge two branches only to end up in conflict hell? You fix a bunch of conflicts only to run git merge --continue and be presented with the same conflicts. Repeat this process and after a few iterations you give up because it just isn't worth the pain and effort.

Would you be surprised to know that there is a git feature specifically for this problem? It's called rerere and I'm going to enrich your life with it now. (I'm going to talk specifically about merging but I think it also helps rebasing)

rerere stands for Reuse Recorded Resolution. The TL;DR version is you ask git to remember how you've resolved hunks in the past, and if the same one comes up for a file in future just redo what you did last time.

To enable this feature just run this lovely command git config --global rerere.enabled true. You can also turn it on by creating this directory in your projects .git/rr-cache, although the global setting is much clearer.

I'll try to take you through an example of how th

@rasmar
rasmar / e2e.sh
Last active March 9, 2018 12:14
E2E - backend start script
#!/bin/bash
echo "Setting up and running e2e tests!"
# Create database and seed (since we might want to include some data needed for our app to work properly like oauth clients
rails db:setup
# Start puma server in e2e environment on meta-address host on port 5001 in detached mode
RAILS_ENV=e2e puma -b tcp://0.0.0.0:5001 -d
@poteto
poteto / FBGroupMemberRemover.js
Last active September 11, 2019 17:49
Delete everyone from your Facebook group! Thanks for the dark UX, FB
class FBGroupMemberRemover {
constructor() {
this.adminText = 'Admin';
this.removeMemberModalHeadingText = 'Remove Member';
this.memberElementSelector = '[data-name="GroupProfileGridItem"]';
this.memberContextMenuSelector = 'button[aria-label="Member Settings"]';
this.removeMemberButtonSelector = 'a[data-testid="leave_group"]'
this.removalOptions = {
@rasmar
rasmar / docker-compose.ci.yml
Last active March 9, 2018 12:14
E2E - docker-compose
version: '2' # Version of composer
services:
backend: # Backend container
build:
context: ~/backend # Backend should be pulled by git to this location
dockerfile: docker/Dockerfile.e2e # The location of Dockerfile, relative to context above
depends_on: # The containers below will be resolved and loaded before backed
- redis
- postgres
- frontend
@rasmar
rasmar / Dockerfile.e2e
Last active March 9, 2018 12:15
E2E - final Dockerfile
## Real app image
FROM nginx:alpine # Remove 'as app'
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 3000
@rasmar
rasmar / Dockerfile
Last active March 9, 2018 12:15
E2E - starting dockerfile
## specify node version
FROM quay.io/netguru/ng-node:6 as builder # First 'FROM', as builder is used as reference below
## add necessary environments
ENV NODE_ENV staging # Set env var
## add code & build app
ADD . $APP_HOME # Copy / add external source to image's filesystem
RUN yarn install # Install all dependencies for frontend app
RUN yarn build # Compile frontend build
@berndverst
berndverst / VSCodeUserSettings.json
Last active May 30, 2024 23:22
VS Code: Override Terminal Colors with Solarized Dark regardless of Theme
{
"workbench.colorCustomizations": {
"terminal.foreground": "#839496",
"terminal.background": "#002833",
"terminal.ansiBlack": "#003541",
"terminal.ansiBlue": "#268bd2",
"terminal.ansiCyan": "#2aa198",
"terminal.ansiGreen": "#859901",
"terminal.ansiMagenta": "#d33682",
"terminal.ansiRed": "#dc322f",
@mayukh18
mayukh18 / flask_setup_heroku.md
Created September 28, 2017 19:38
How to setup flask app with database on heroku

Setting up flask app in heroku with a database

The below article will cover the intricacies of setting up databases and heroku in respect to a flask app. This is more like a memo and will have out of sequence instructions or solutions to errors so read thoroughly.

Setting up a database

You'll need the packages

@dogeared
dogeared / 00_README
Last active November 24, 2020 23:47 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack
This builds off the excellent work of @lmarkus.
The scripts below can be used in conjunction with the Slack Emoji Tools Google Chrome extension to export emojis from
one Slack team and import into another team.
Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621