Skip to content

Instantly share code, notes, and snippets.

View joyoyoyoyoyo's full-sized avatar
🏴
living it up and busy supporting my community.

Angel Ortega (he/they) joyoyoyoyoyo

🏴
living it up and busy supporting my community.
View GitHub Profile
package sbt
package internal
package fix
import scalafix.v1._
import scala.meta._
class Sbt0_13BuildSyntax extends SyntacticRule("Sbt0_13BuildSyntax") {
override def fix(implicit doc: SyntacticDocument): Patch = {
doc.tree.collect {
@joyoyoyoyoyo
joyoyoyoyoyo / CustomIntFloatDict_IntFloatValueError.py
Created June 15, 2020 07:02 — forked from StephenFordham/CustomIntFloatDict_IntFloatValueError.py
CustomIntFloatDict and IntFloatValueError class code
# Create a dictionary that can only hold integers and floats as its values
class IntFloatValueError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return '{} is invalid input, CustomIntFloatDict can only accept ' \
'integers and floats as its values'.format(self.value)
@joyoyoyoyoyo
joyoyoyoyoyo / asyncio_ssl_example.py
Created May 31, 2020 08:30 — forked from messa/asyncio_ssl_example.py
Python asyncio + SSL TCP client/server example
#!/usr/bin/env python3
import asyncio
import multiprocessing
import os
import ssl
from time import sleep
port = 9000
@joyoyoyoyoyo
joyoyoyoyoyo / gist:c792918352e71586794150db7f349adc
Created May 23, 2020 08:24 — forked from mitchellh/gist:1277049
Configure Vagrant VM to use Host DNS for VPN
Vagrant::Config.run do |config|
# ...
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
@joyoyoyoyoyo
joyoyoyoyoyo / install.md
Created May 23, 2020 08:23 — forked from floehopper/install.md
Installing OSX Sierra from scratch

List & install software updates

softwareupdate --list
sudo softwareupdate --verbose --install --all

Set computer name

COMPUTER_NAME="<computer-name>"
sudo scutil --set ComputerName $COMPUTER_NAME
@joyoyoyoyoyo
joyoyoyoyoyo / install_linuxbrew_on_centos7.sh
Created May 23, 2020 04:49 — forked from warking/install_linuxbrew_on_centos7.sh
standalone linuxbrew setup script for CentOS 7
# Non-root account is recommended for this process
# centos-specific prepration
sudo yum -y update && sudo yum -y groupinstall 'Development Tools' && sudo yum -y install curl irb m4 ruby
# Sanitize the environment
PATH=~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
unset LD_LIBRARY_PATH PKG_CONFIG_PATH
# install linuxbrew
@joyoyoyoyoyo
joyoyoyoyoyo / docker-install-parrot.sh
Created May 1, 2020 00:53 — forked from nuga99/docker-install-parrot.sh
Install Docker Engine on Parrot OS
#!/bin/sh
# From https://www.hiroom2.com/2017/09/24/parrotsec-3-8-docker-engine-en/
set -e
# Install dependencies.
sudo apt install -y curl apt-transport-https \
software-properties-common ca-certificates
# Install docker.
@joyoyoyoyoyo
joyoyoyoyoyo / README.MD
Created April 19, 2020 21:30 — forked from RichardBronosky/README.MD
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@joyoyoyoyoyo
joyoyoyoyoyo / array_slicing_and_compaction.advanced.bash
Created March 24, 2020 11:32
Advanced Bash :: Array slicing and compaction in bash
# Advanced Bash :: Array slicing and compaction in bash
# TL;DR
X=(something 'whatever' "i have more S P A C E S than i can give away. arent you jealous?")
# ${X[@]} the usual whole array
# ${X[@]:index:length} slice from index to index+length-1 inclusive
# ${X[@]::length} slice from 0 to length-1 inclusive
# ${X[@]:index} slice from index to end of array inclusive