Skip to content

Instantly share code, notes, and snippets.

View vniche's full-sized avatar

Vinicius Niche Correa vniche

View GitHub Profile
Making install in data
make[1]: Entering directory '/home/vinicius/budgie-desktop/data'
GEN com.evolve-os.budgie.panel.gschema.valid
make[2]: Entering directory '/home/vinicius/budgie-desktop/data'
make[2]: Nothing to be done for 'install-exec-am'.
/bin/mkdir -p '/usr/share/applications'
/usr/bin/install -c -m 644 budgie-settings.desktop '/usr/share/applications'
/bin/mkdir -p '/usr/share/budgie-desktop'
/usr/bin/install -c -m 644 layout.ini '/usr/share/budgie-desktop'
/bin/mkdir -p '/usr/share/xsessions'
@vniche
vniche / main.yml
Last active June 15, 2018 16:12
Primeira tentativa da task da role ansible-resource-quota
# tasks/main.yml
---
- shell: systemctl set-property haproxy.service CPUAccounting=true CPUQuota=20% MemoryLimit=10M
# ln -s /usr/lib/systemd/system/haproxy.service /etc/systemd/system/haproxy.service
- file:
src: /usr/lib/systemd/system/haproxy.service
dest: /etc/systemd/system/haproxy.service
state: link
@vniche
vniche / local-dev.sh
Last active September 9, 2018 01:44
Single node Kubernetes on your local machine 🚢
#!/bin/bash
# For binaries installation instructions go for https://kubernetes.io/docs/tasks/tools/install-kubeadm/
# Clean previous installations:
sudo -E kubeadm reset
rm -rf ~/.kube/*
# Comment search domains configured in your resolv.conf if you have any, as stated in:https://github.com/kubernetes/kubernetes/issues/57709
sudo sed -e 's/^search/#search/' -i /etc/resolv.conf
@vniche
vniche / config.yml
Last active July 2, 2019 23:36
CircleCI example workflow
# Example of a CircleCI's config file (.circleci/config.yml)
---
version: 2
jobs:
build:
docker:
- image: circleci/node:10
# choosing a neutral folder (/tmp) as it is commonly accessible by all users in most types of linuxes
working_directory: /tmp/repo
@vniche
vniche / gqlgen.yml
Created March 7, 2020 00:33
gqlgen config file
# .gqlgen.yml example
#
# Refer to https://gqlgen.com/config/
# for detailed .gqlgen.yml documentation.
schema:
- schema.graphql
exec:
filename: generated.go
model:
@vniche
vniche / schema.graphql
Last active March 7, 2020 00:58
GraphQL Schema
scalar Date
schema {
query: Query
mutation: Mutation
}
type Query {
user(id: ID!): User!
users: [User!]
@vniche
vniche / resolver.go
Created March 7, 2020 01:07
Initially generated resolver.go
// THIS CODE IS A STARTING POINT ONLY. IT WILL NOT BE UPDATED WITH SCHEMA CHANGES.
package graph
import (
"context"
)
type Resolver struct{}
func (r *mutationResolver) Signup(ctx context.Context, input NewUser) (string, error) {
@vniche
vniche / main.go
Created March 7, 2020 01:29
Intial main.go to use with gqlgen
package main
import (
"log"
"net/http"
"os"
"github.com/99designs/gqlgen/handler"
"github.com/artemis-tech/sample-graph/graph"
)
@vniche
vniche / resolver.go
Created March 7, 2020 18:18
Handling not implemented as a GraphQL error in gqlgen
// THIS CODE IS A STARTING POINT ONLY. IT WILL NOT BE UPDATED WITH SCHEMA CHANGES.
package graph
import (
"context"
"fmt"
)
type Resolver struct{}
@vniche
vniche / main.go
Created March 9, 2020 01:16
Global in-memory storage for GraphQL in Golang
...
"github.com/artemis-tech/sample-graph/graph"
)
func main() {
port := "3030"
if os.Getenv("PORT") != "" {
port = os.Getenv("PORT")
}