Skip to content

Instantly share code, notes, and snippets.

View MattRay0295's full-sized avatar
💭
Hackin' Away

Matt Ray MattRay0295

💭
Hackin' Away
View GitHub Profile
########################## 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 #
@MattRay0295
MattRay0295 / README.md
Created April 13, 2021 01:26 — forked from wesray/README.md
Windows 10 Install - Chocolatey with Applications
@peterlafferty
peterlafferty / places.sql
Created April 20, 2017 20:34
simple schema to demonstrate a stored procedure in mysql
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 */;
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active April 2, 2024 10:04
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@cajames
cajames / setup_mac.sh
Last active August 14, 2023 04:01
Script to setup a new Developer Mac
# 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
@wojteklu
wojteklu / clean_code.md
Last active May 24, 2024 10:44
Summary of 'Clean code' by Robert C. Martin

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.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@fevangelou
fevangelou / my.cnf
Last active May 23, 2024 15:15
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === 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.
#
@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2024 12:59
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

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
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 14, 2024 18:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/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
@benders
benders / index-usage.sql
Created May 19, 2009 18:31 — forked from gnarg/gist:114268
Finds unused indexes in a mysql database
// 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