Skip to content

Instantly share code, notes, and snippets.

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

Diego Arce arcezd

🏠
Working from home
View GitHub Profile
@arcezd
arcezd / .hyper.js
Last active November 6, 2017 01:15
hyper.is | Config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@arcezd
arcezd / .bash_profile
Last active April 3, 2018 21:08
Bash profile [MacOS]
# Homebrew EXPORT
export PATH="$PATH:$HOME/.local/bin"
# NVM EXPORT
export NVM_DIR="$HOME/.nvm"
source $(brew --prefix nvm)/nvm.sh
# PYENV EXPORT
export PYENV_ROOT=/usr/local/var/pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
@arcezd
arcezd / startup-centos-docker.sh
Created February 25, 2019 20:02
Install docker to CentOS7
#!/bin/bash
yum -y update
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
@arcezd
arcezd / docker-swarm-status.sh
Created February 26, 2019 20:30
Check docker swarm status
#!/bin/bash
if [ "$(docker info --format '{{.Swarm.LocalNodeState}}')" = "inactive" ]; then
echo "Node is not in a swarm cluster"
exit 0
elif [ "$(docker info --format '{{.Swarm.LocalNodeState}}')" = "active" ]; then
echo "Node is in a swarm and healthy"
elif [ "$(docker info --format '{{.Swarm.LocalNodeState}}')" = "pending" ]; then
echo "Node is in a swarm but no quorum"
elif [ "$(docker info --format '{{.Swarm.LocalNodeState}}')" = "locked" ]; then
@arcezd
arcezd / Dockerfile
Created June 24, 2020 23:44
Dockerfile Typescript
FROM node:12-alpine AS builder
# Use build directory
WORKDIR /build
# Copy app files
COPY ./ /build/
# Install node dependencies
RUN npm install
@arcezd
arcezd / build.gradle
Created October 2, 2017 16:37
Build Gradle to read yaml properties [Gradle 2.13]
import org.yaml.snakeyaml.DumperOptions
import org.yaml.snakeyaml.Yaml
buildscript{
ext{
springBootVersion = '1.5.7.RELEASE'
}
repositories{
mavenCentral()
}
@arcezd
arcezd / public_private_subnets_ipv4_only
Last active December 23, 2021 02:20
Terraform AWS Network Templates
locals {
main_vpc_cidr_block = "10.0.0.0/16"
public_subnets = {
"PublicSubnetA" = {
cidr_block = "10.0.1.0/24",
availability_zone_id = "use1-az4"
},
"PublicSubnetB" = {
cidr_block = "10.0.2.0/24",
availability_zone_id = "use1-az6"
@arcezd
arcezd / led.py
Last active April 8, 2023 00:38
Ender 3 BIGTREETECH SKR Mini v2.0 - Klipper
import board
import neopixel
pixels = neopixel.NeoPixel(board.D18, 19)
#pixels[0] = (255, 0, 128)
#pixels.fill((255, 0, 255)) ## all yellow
#pixels.fill((255,0,128))
#for x in range(7, 12):
# pixels[x] = (255, 255, 0)
@arcezd
arcezd / .amethyst.yml
Created September 1, 2023 00:20
AzD.Terminal
# Default settings for amethyst
# Repo: `https://github.com/ianyh/Amethyst`
#
# Note due to issue 1419 (https://github.com/ianyh/Amethyst/issues/1419) some
# config values may conflict and not work if they are the same as the default
# values for amathyst. You can see these values on github at
# https://github.com/ianyh/Amethyst/blob/development/Amethyst/default.amethyst
# If you're experiencing conflicts and the settings are the same as the default,
# comment out the commands in this file.
#