new Vuex.Store({
modules: {
counter: {
state: {
count: 0,
},
getters: {
square(state) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To use simply copy ClassPropertyMeta and classproperty into your project | |
""" | |
class ClassPropertyMeta(type): | |
def __setattr__(self, key, value): | |
obj = self.__dict__.get(key, None) | |
if type(obj) is classproperty: | |
return obj.__set__(self, value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Get the defaults that most users want. | |
try | |
source $VIMRUNTIME/vimrc_example.vim | |
catch | |
source $VIMRUNTIME/defaults.vim | |
endtry | |
" Disable the pesky mouse | |
set mouse= | |
set ttymouse= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import imaplib | |
import sys | |
from itertools import chain | |
server = 'imap.mail.yahoo.com' | |
port = 993 | |
username = '[email protected]' | |
password = 'hunter2' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 ### Kernel module `br_netfilter` | |
20 - `sudo vim /etc/modules` and add `br_netfilter` to the end. | |
21 - `sudo modprope br_netfilter` | |
22 - `sudo vim /etc/sysctl.conf` and add the following lines: | |
23 ``` | |
24 net.bridge.bridge-nf-call-arptables = 1 | |
25 net.bridge.bridge-nf-call-ip6tables = 1 | |
26 net.bridge.bridge-nf-call-iptables = 1 | |
27 ``` | |
28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All these block should feed into eachother. Meaning the first block should points at the second, and so on. | |
Repeat | Unconditional | Always active | |
execute as @a[nbt={Health:0.0f}] store result score @s lastpos_x run data get entity @s Pos[0] | |
Chain | Conditional | Always active | |
execute as @a[nbt={Health:0.0f}] store result score @s lastpos_y run data get entity @s Pos[1] | |
Chain | Conditional | Always active | |
execute as @a[nbt={Health:0.0f}] store result score @s lastpos_z run data get entity @s Pos[2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is an example of how to create a static property using a | |
non-data descriptor. | |
https://docs.python.org/2/howto/descriptor.html | |
This works in python >= 2.3 including 3.x. | |
In this example the __get_default() method is called the first time | |
we need to access Widget.default. The __get_default method clobbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bip": "192.168.128.5/24", | |
"default-address-pools": [{"base": "192.168.0.0/17", "size": 24}] | |
} |
This document describes how I set up my development environment with a fresh install of Xubuntu 16.04 (Xubuntu is Ubuntu with xfce).
Currently this document describes how to set up:
- Generic desktop environment with all the goodies (themes, keyboard, utilities).
- Python 2 & 3 development with PyCharm.