Skip to content

Instantly share code, notes, and snippets.

View rigor789's full-sized avatar
🏠
Working from home

Igor Randjelovic rigor789

🏠
Working from home
View GitHub Profile
@rigor789
rigor789 / track-path.html
Created September 25, 2018 19:37
A snippet for NativeScript-Vue to track the current path on the frame.
<Frame @loaded="onFrameLoaded" />
<!-- and in all the <Page> elements -->
<Page path="/path-of-this-page">...</Page>
<script>
export default {
data() {
return {
@rigor789
rigor789 / README.md
Created August 31, 2018 19:18
Creating a release build with NativeScript-Vue vue-cli-template (old)

Creating a release build in vue-cli-template (old)

First clean the dist folder before building either an android or ios build:

npm run clean

Android Build

@rigor789
rigor789 / methods.js
Created May 23, 2018 09:57
NSVue js transition hooks
methods: {
beforeEnter(el) {
el.setAttribute('translateY', -200);
},
enter(el, done) {
el.nativeView
.animate({
translate: {
x: 0,
y: 0,
@rigor789
rigor789 / externals.js
Last active May 11, 2018 14:39
NativeScript-Vue-Externals test
// at the top of webpack.config.js:
const nodeModulesPath = path.resolve(__dirname, 'node_modules')
externals: (context, request, callback) => {
if(context.startsWith(nodeModulesPath)) {
const module = context.replace(nodeModulesPath, '').split(path.sep).find(p => !!p)
try {
const pkg = require(path.resolve(nodeModulesPath, module, 'package.json'))
@rigor789
rigor789 / README.md
Created November 24, 2017 13:14
Using Lottie with nativescript-vue

Using Lottie with NativeScript-Vue

Install Lottie

tns plugin add nativescript-lottie

Register element

@rigor789
rigor789 / README.md
Last active June 19, 2020 17:29
ZNC install script!

ZNC install script

Usage:

Run sudo install.sh to compile ZNC

Edit default config in /src/znc.conf.default

The default user/password is admin/admin

@rigor789
rigor789 / article.md
Last active August 29, 2015 14:18
My thoughts about using repositories in a laravel application.

#Repositories vs No Repositories

I always thought decoupling is a good thing but there are cases where you think you are decoupling when in fact, you are just adding a new layer to the coupled code.

Let's see an example, say you have a typical CRUD application, a blog (simple example, applies even more to more complex cases). You have Posts, Categories, and Tags let's say. With eloquent it's pretty easy to set the relations up and use them.

You want to be proficient with your code, and you create a PostRepository interface and others (Tag / Category). Then you proceed to create an concrete implementation for Eloquent, and you just "map" those common methods to eloquent.