Skip to content

Instantly share code, notes, and snippets.

View sevcsik's full-sized avatar

András Sevcsik-Zajácz sevcsik

View GitHub Profile
@sevcsik
sevcsik / README.md
Last active August 28, 2017 17:47
Installing Lisk on Gentoo

Ebuilds for Lisk Core and Lisky are available in the unofficial sevcsik overlay. Add the overlay (using Layman):

# layman -fa sevcsik

Lisk Core

  1. Install the lisk-core package.

Keybase proof

I hereby claim:

  • I am sevcsik on github.
  • I am sevcsik (https://keybase.io/sevcsik) on keybase.
  • I have a public key whose fingerprint is 233B 5DFD 72D4 625D 74E5 28C6 F5EF 9487 07BB 1201

To claim this, I am signing this object:

@sevcsik
sevcsik / prepare-commit-msg.sh
Last active January 18, 2016 13:33 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# original by https://gist.github.com/bartoszmajsak/1396344
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop rc test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@sevcsik
sevcsik / git-send-review.sh
Last active August 29, 2015 14:19
Easy submit to gerrit
#!/bin/bash
if [ -z "$1" ]
then
echo "Base commit:"
read COMMIT
else
COMMIT="$1"
fi
@sevcsik
sevcsik / metatox.md
Created March 4, 2015 10:50
Proposal for using Tox on multiple devices

Proposal for using Tox on multiple devices

Aladar has 3 devices. A phone (p), a deskop (d), a tablet (t). All of these devices have a unique Tox ID.

There is a fourth Tox ID (A), which is the ID of Aladar, regardless which device is he using. All of his contacts know only this ID.

p, d, t and A have each other on their contact list.

@sevcsik
sevcsik / nodejs-angularjs-common-modules.md
Last active February 15, 2022 09:38
Sharing modules between NodeJS and AngularJS

They say that one of the pros of NodeJS is that you use the same language on the back-end and the front-end, so it's easy to share code between them. This sounds great in theory, but in practice the synchronous dependency handling in NodeJS works completely different than any client-side frameworks (which are asynchronous).

Usually that means that you end up copy-pasting your code between your NodeJS sources and your client-side sources, or you use some tool like Browserify, which is brilliant, but they add an extra step in the build process and most likely will conflict with the dependency handling of the framework of your choice (like AnularJS DI). I couldn't look in the mirror if I would call that code sharing.

Fortunately, with a couple of lines of boilerplate code, you can write a module which works in NodeJS and AngularJS as well without any modification.

No globals in the front-end, and dependencies will work. The isNode and isAngular va