Skip to content

Instantly share code, notes, and snippets.

View Pepeye's full-sized avatar

Pepeye

View GitHub Profile
@Pepeye
Pepeye / neo4j-docker-compose.yml
Created December 1, 2018 12:46
Neo4j docker compose
version: '3'
services:
neo4j:
image: neo4j:latest
network_mode: "bridge"
ports:
- "7474:7474"
- "7687:7687"
environment:
@Pepeye
Pepeye / dgraph-docker-compose.yml
Last active December 1, 2018 12:47
dgraph docker-compose file
version: "3.2"
services:
zero:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
@Pepeye
Pepeye / .git-commit-template.txt
Created October 8, 2018 17:22 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@Pepeye
Pepeye / fix.sh
Created September 27, 2018 11:32
Reverting and fixing old commits
git filter-branch --env-filter '
oldname="OLD_NAME"
oldemail="OLD_EMAIL"
newname="NEW_NAME"
newemail="NEW_EMAIL"
[ "$GIT_AUTHOR_EMAIL"="$oldemail" ] && GIT_AUTHOR_EMAIL="$newemail"
[ "$GIT_COMMITTER_EMAIL"="$oldemail" ] && GIT_COMMITTER_EMAIL="$newemail"
[ "$GIT_AUTHOR_NAME"="$oldname" ] && GIT_AUTHOR_NAME="$newname"
[ "$GIT_COMMITTER_NAME"="$oldname" ] && GIT_COMMITTER_NAME="$newname"
' HEAD
@Pepeye
Pepeye / main.go
Last active June 12, 2018 16:15
Golang & JSON config files
package main
import (
"encoding/json"
"fmt"
"os"
"time"
"github.com/rs/xid"
)
@Pepeye
Pepeye / serverless.yaml
Last active June 5, 2018 18:26
serverless yaml template - golang
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"acm:*",
"cloudformation:Create*",
"cloudformation:Delete*",
"cloudformation:Describe*",

'Go Get' Private Repo from Bitbucket

source: stackoverflow

go get uses git internally. The following one liners will make git and consequently go get clone your package via SSH.

Github:

git config --global url."[email protected]:".insteadOf "https://github.com/"

BitBucket:

# pull the latest Dgraph version with
docker pull dgraph/dgraph
# Run dgraphzero - set <VOLUMEPATH> and <CONTAINERNAME>
# <VOLUMEPATH> can be current working direcotory pwd
# docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 -v pwd:/dgraph --name <CONTAINERNAME> dgraph/dgraph dgraph zero
docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 -v <VOLUMEPATH>:/dgraph --name <CONTAINERNAME> dgraph/dgraph dgraph zero
# In another terminal, now run dgraph
docker exec -it <CONTAINERNAME> dgraph server --lru_mb 2048 --zero localhost:5080
@Pepeye
Pepeye / learning.md
Created February 15, 2017 13:46 — forked from sibelius/learning.md
Learning Path React Native

Basics

  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation