new Vuex.Store({
modules: {
counter: {
state: {
count: 0,
},
getters: {
square(state) {
This file contains 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
[CmdletBinding(PositionalBinding=$False)] | |
param( | |
[int]$Port = 1234, | |
[string]$File = $null, | |
[Parameter(ValueFromRemainingArguments=$True)] | |
[string[]]${-} = "" | |
) | |
$Text = ${-} -join " " | |
Write-Host "Port $Port" |
This file contains 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
#!/bin/bash | |
#Generated by JetBrains Toolbox 2.1.2.18853 at 2023-12-18T23:07:26.549763568 | |
# Heavily modified by me to properly background the pycharm command | |
# https://gist.github.com/Skinner927/dc006bfcc50e58b2227bb4d7d68753ca | |
# | |
# Many issues are open but here's a recent one: | |
# https://youtrack.jetbrains.com/issue/IDEA-193204/IDEA-Pycharm-command-line-launchers-never-exit-on-Linux | |
PYCHARM_BIN="/home/user/.local/share/JetBrains/Toolbox/apps/pycharm-professional/bin/pycharm.sh" |
This file contains 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
#!/bin/bash | |
# docker run --rm -ti -v /tmp/git-out:/out registry.access.redhat.com/ubi7/ubi bash | |
# https://ius.io/setup | |
yum install -y \ | |
https://repo.ius.io/ius-release-el7.rpm \ | |
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
# Build tools | |
yum install -y make autoconf gcc |
This file contains 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
; Place this at the beginning of the start g-code. | |
; It will allow the hotend and bed to heat at the same time. | |
M140 S{material_bed_temperature} ; start heating the bed | |
M104 S{material_print_temperature} T0 ; start heating the hotend | |
M109 S{material_print_temperature} T0 ; wait for hotend to hit target temp | |
M190 S{material_bed_temperature} ; wait for bed temp (should be there) | |
M105 ; report temp |
This file contains 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
#!/bin/sh | |
# Mirrors an entire repo with al tags and branches. | |
# Based off this article. | |
# https://www.edwardthomson.com/blog/mirroring_git_repositories.html | |
set -eufo pipefail | |
if [ "$#" -lt 1 ]; then | |
echo "usage: $0 SOURCE_REPO_URL [PACKAGED_NAME]" >&2 | |
exit 1 |
This file contains 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
#!/bin/sh | |
# Derived from: | |
# https://www.edwardthomson.com/blog/mirroring_git_repositories.html | |
# Mirrors repo and zips it up for easy transport to offline network | |
set -eufo pipefail | |
if [ "$#" -ne 1 ]; then | |
echo "usage: $0 source_repo_url" >&2 |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2019-12-04 22:20:26" build="180626"> | |
<value name="Language" type="string" data="en"/> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{WSL::zsh}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> |
This file contains 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 a roundabout way to start ipython from inside a virtualenv without it being installed | |
# in that virtualenv. The only caveot is that the "global" python must have ipython installed. | |
# What this function does that's different than simply calling the global ipython is it ensures to | |
# call the ipython that is installed for the same major.minor python version as in the virtualenv. | |
# This is most useful if you use pyenv for example as global python3 could be 3.7 and local | |
# virtualenv python3 is 3.6. | |
# This is designed to be dropped into your shell profile (~/.bashrc|~/.zshrc) | |
unset ipy_lookup | |
declare -A ipy_lookup |
This file contains 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) |
NewerOlder