Skip to content

Instantly share code, notes, and snippets.

View hootlex's full-sized avatar

Alex Kyriakidis hootlex

View GitHub Profile
import { ref } from 'vue';
const useCounterUp = (initialVaue = 0) => {
const counter = ref(initialVaue);
const increment = () => counter.value += 1;
return { counter, increment };
};
const useCounterDown = (initialVaue = 0) => {
const counter = ref(initialVaue);
@hootlex
hootlex / Component.vue
Created December 8, 2016 00:47 — forked from nickbasile/Component.vue
How to use a namespaced action in a Vue.js component
<template>
<div>
<button @click="increment">Increment</button>
</div>
</template>
<script>
import { mapActions } from 'vuex'
export default{
methods: {
@hootlex
hootlex / Common-Currency.json
Created August 5, 2016 02:41 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@hootlex
hootlex / 0_reuse_code.js
Created June 14, 2016 21:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hootlex
hootlex / install.sh
Last active August 29, 2015 14:19 — forked from stayallive/install.sh
Install PHP 5.6.8 on Plesk 11.5 & 12 (CentOS 6)
#!/bin/bash
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Get us a clean working directory
mkdir /php
@hootlex
hootlex / install.sh
Last active August 29, 2015 14:19 — forked from stayallive/install.sh
Install PHP 5.5.24 on Plesk 11.5 and 12 (CentOS 6)
#!/bin/bash
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Get us a clean working directory
mkdir /php