Skip to content

Instantly share code, notes, and snippets.

nagyv /
Created July 31, 2022 17:15
Postgres DB module
provider "postgresql" {
host = var.server_host
port = var.server_port
database = "postgres"
username = var.username
password = var.password
sslmode = var.sslmode
connect_timeout = 15
superuser = false
nagyv / git_push.yaml
Created September 14, 2021 07:12
GitLab CI job for Git push
View git_push.yaml
# Usage
# in .gitlab-ci.yml
# commit packages:
# extends: .git:push
# stage: deploy
# variables:
# COMMIT_MESSAGE: "Hydrated packages"
# script:
# cp -r file-to-commit/* "${CI_COMMIT_SHA}/file-to-commit/"
# dependencies:
nagyv /
Created July 2, 2019 07:36

Keybase proof

I hereby claim:

  • I am nagyv on github.
  • I am nagyv ( on keybase.
  • I have a public key ASBS9dc3poTC2gmEbZN-_wX0M-SmIGwWJ5huIaxZPQwljQo

To claim this, I am signing this object:

nagyv / index.js
Created April 19, 2019 07:26
get and create record in GameSparks Data Service
View index.js
const axios = require('axios')
const username = process.env.LOGIN
const password = process.env.PASSWORD
const game = process.env.GAME
async function jwtAuth(username, password, game, filter) {
const response = await axios({
url: `${game}/jwt`,
nagyv / 1 -
Created June 3, 2018 19:58
using Nes with Schmervice
View 1 -

This is a simple example to use Nes with Schmervice in hapipal-like project.

As there might be several susbcription channels, I prefer to separate them by domain, and have a single service that handles all the even passing between different parts of the code.

Example usage:

  // somewhere in a router's handler
nagyv / example.html
Created February 6, 2018 12:15
example html for an RN bug report
View example.html
<!DOCTYPE html>
<html lang="en">
// from:
function awaitPostMessage() {
let isReactNativePostMessageReady = !!window.originalPostMessage;
const queue = [];
let currentPostMessageFn = function store(message) {
if (queue.length > 100) queue.shift();
nagyv / WhoopsModal.js
Created September 8, 2017 09:09
Cannot read property 'state' of undefined
View WhoopsModal.js
import React, { Component } from 'react'
// import PropTypes from 'prop-types';
import { View } from 'react-native'
import {
} from 'native-base'
import Modal from 'react-native-modal'
nagyv / gradlew logs
Created August 30, 2017 22:53
gradlew logs
View gradlew logs
C:\Users\Viktor\Projects\potzak\android\app\src\main\java\com\potzak\ error: package com.learnium.RNDeviceInfo does not exist
import com.learnium.RNDeviceInfo.RNDeviceInfo;
C:\Users\Viktor\Projects\potzak\android\app\src\main\java\com\potzak\ error: package com.lugg.ReactNativeConfig does not exist
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
C:\Users\Viktor\Projects\potzak\android\app\src\main\java\com\potzak\ error: package does not exist
C:\Users\Viktor\Projects\potzak\android\app\src\main\java\com\potzak\ error: package does not exist
nagyv /
Created May 27, 2017 18:32
Mandrill API mocking in Nodejs

A simple way to mock calls to the Mandrill API from nodejs tests. It uses the amazing mockery package.

nagyv /
Last active September 20, 2016 13:28
Git image diff

What it this for?

Have you ever wandered how to follow changes in images using git? This is a solution for the problem.

How to install

  1. Copy somewhere under your $PATH. Probably $HOME/bin.
  2. Create the $HOME/.gitattributes file with the following content ~/.gitattributes