Skip to content

Instantly share code, notes, and snippets.

Jonas Arxcis

Block or report user

Report or block Arxcis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kk-checkbox-lite.vue
<template>
<label :class="[$options.name, color, mark, shape, size, { disabled }]">
<input
type="checkbox"
:class="['box', { selected: value }]"
@click="onClick"
>
<slot v-if="$slots.default" />
</label>
</template>
@Arxcis
Arxcis / demo.html
Created Jan 25, 2019
How to navigate without hard-refresh of browser
View demo.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#open {height: 200px;}
#close {height: 200px;}
#gallery { height: 200px; display: none; }
</style>
</head>
@Arxcis
Arxcis / demo.html
Created Jan 25, 2019
How to navigate without hard-refresh of browser
View demo.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#open {height: 200px;}
#close {height: 200px;}
#gallery { height: 200px; display: none; }
</style>
</head>
View simplecells-v-if.vue
<tbody
v-for="(row, index) in filteredRows"
:key="row.id"
@dragenter.prevent="dragenter"
@dragleave.prevent="dragleave"
@dragover.prevent="dragover"
@drop.prevent="drop"
:data-id="row.id"
:data-idx="index"
v-show="row.visible"
@Arxcis
Arxcis / gist:b28f3c8363ca9051db37617aa0c0719a
Created Sep 18, 2018
install with feature/prompt-with-affordance
View gist:b28f3c8363ca9051db37617aa0c0719a
jonasjso in ~/git/technocake/goto on master
$ git fetch origin feature/prompt-with-affordance
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 2), reused 4 (delta 2), pack-reused 0
Unpacking objects: 100% (4/4), done.
From github.com:technocake/goto
* branch feature/prompt-with-affordance -> FETCH_HEAD
* [new branch] feature/prompt-with-affordance -> origin/feature/prompt-with-affordance
View gist:42ef654a811cf5b7b801a61800d41dd5
jonasjso in ~/Desktop/npmcoolinit
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
View npm run watch error
ERROR in ../kk-vue-components/node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}],"env"],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}],["transform-runtime",{"polyfill":false}],["transform-object-rest-spread"]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/kk-vue-components/src/svg-icon.vue
Module build failed: Error: Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they neen separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
at assertNoDuplicates (/home/jonasjso/git/kvalitetskontroll/kk-vue-components/node_modules/@babel/core/lib/config/config-descriptors.js:201:13)
@Arxcis
Arxcis / goto.sh
Last active Sep 16, 2018
refactor goto.sh
View goto.sh
!/bin/bash
PROJECT=`cat ${HOME}/.goto/active-project`
GOTOPATH="${HOME}/.goto/projects/${PROJECT}.json"
GOTO="/usr/local/opt/goto/the_real_goto.py"
# Special case no 1
if [ "$1" = "cd" ]; then
# hack to cd in this shell to the ouput of goto show <magicword>
path=`goto show "$2"`
View Python - Matrix and Vector class - WORK IN PROGRESS
class Vector:
"""
class -- Represents a Vector with n length
"""
def __init__(self, nparray):
self.array = nparray #1d numpy array
self.length = len(self.array)
self.x = self.array[0]
self.y = self.array[1]
View Collision detection example
# 09.12.2016 - Jonas
# Trying to make an efficient collision detection
import random
import math
from . import Blob
widtH = 800
You can’t perform that action at this time.