Skip to content

Instantly share code, notes, and snippets.

@nagyv
nagyv / git_push.yaml
Created Sep 14, 2021
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:
View keybase.md

Keybase proof

I hereby claim:

  • I am nagyv on github.
  • I am nagyv (https://keybase.io/nagyv) on keybase.
  • I have a public key ASBS9dc3poTC2gmEbZN-_wX0M-SmIGwWJ5huIaxZPQwljQo

To claim this, I am signing this object:

@nagyv
nagyv / index.js
Created Apr 19, 2019
get and create record in GameSparks Data Service
View index.js
const axios = require('axios')
require('dotenv').config()
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: `https://auth.gamesparks.net/restv2/auth/game/${game}/jwt`,
@nagyv
nagyv / 1 - readme.md
Created Jun 3, 2018
using Nes with Schmervice
View 1 - readme.md

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
nagyv / example.html
Created Feb 6, 2018
example html for an RN bug report
View example.html
<!DOCTYPE html>
<html lang="en">
<head>
<script>
// from: https://github.com/facebook/react-native/issues/11594#issuecomment-274689549
function awaitPostMessage() {
let isReactNativePostMessageReady = !!window.originalPostMessage;
const queue = [];
let currentPostMessageFn = function store(message) {
if (queue.length > 100) queue.shift();
@nagyv
nagyv / WhoopsModal.js
Created Sep 8, 2017
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 {
H1,
Icon,
Button,
Text
} from 'native-base'
import Modal from 'react-native-modal'
View gradlew logs
C:\Users\Viktor\Projects\potzak\android\app\src\main\java\com\potzak\MainApplication.java:8: 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\MainApplication.java:9: 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\MainApplication.java:10: error: package com.microsoft.azure.mobile.react.crashes does not exist
import com.microsoft.azure.mobile.react.crashes.RNCrashesPackage;
^
C:\Users\Viktor\Projects\potzak\android\app\src\main\java\com\potzak\MainApplication.java:11: error: package com.microsoft.azure.mobile.react.analytics does not exist
@nagyv
nagyv / README.md
Created May 27, 2017
Mandrill API mocking in Nodejs
View README.md

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

@nagyv
nagyv / README.md
Last active Sep 20, 2016
Git image diff
View README.md

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 git-imgdiff.sh somewhere under your $PATH. Probably $HOME/bin.
  2. Create the $HOME/.gitattributes file with the following content ~/.gitattributes
@nagyv
nagyv / rebuild_libreoffice.sh
Last active Oct 4, 2018 — forked from lukebranch/rebuild_libreoffice.sh
Rebuild Libreoffice for ubuntu 14.04 trusty with python2 support for python-uno
View rebuild_libreoffice.sh
#!/bin/sh
# we need some fixes from 14.10
# sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3
sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3 -y
# fetch this repository
sudo apt-get update -y
# update your libreoffice installation
sudo apt-get install libreoffice python3-uno -y
# get all build dependencies for libreoffice
sudo apt-get build-dep libreoffice -y