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
########################## Add Chia Nodes ########################## | |
# This script adds a list of Chia nodes to the currently installed # | |
# Chia client on your Windows 10 system. # | |
# # | |
# See more info on Chia at https://chia.net. # | |
# # | |
# You can download the latest Windows version of Chia from # | |
# https://github.com/Chia-Network/chia-blockchain/releases. # | |
# # | |
# You are using this script at your own risk. I am unable to # |
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
CREATE DATABASE IF NOT EXISTS `places` /*!40100 DEFAULT CHARACTER SET utf8 */; | |
USE `places`; | |
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) | |
-- | |
-- Host: localhost Database: places | |
-- ------------------------------------------------------ | |
-- Server version 5.7.18 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
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
require 'sidekiq/api' | |
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear |
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
# Script to setup a new Mac | |
# Fix up the key repeat issues on MacOS Sierra. Need the key repeats for VIM! | |
defaults write NSGlobalDomain KeyRepeat -int 2 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 15 | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
# Finder should show all .files | |
defaults write com.apple.finder AppleShowAllFiles YES |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
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
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated December 2021 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
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 | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
// Finds unused indexes in a mysql database | |
SELECT | |
t.TABLE_SCHEMA, | |
t.TABLE_NAME, | |
s.INDEX_NAME, | |
s.COLUMN_NAME, | |
s.SEQ_IN_INDEX, | |
( SELECT MAX(SEQ_IN_INDEX) | |
FROM INFORMATION_SCHEMA.STATISTICS s2 |
NewerOlder