Skip to content

Instantly share code, notes, and snippets.

View RayneDance's full-sized avatar

Alexander Jordan RayneDance

  • Cerus Esports
  • Austin, TX
View GitHub Profile
@RayneDance
RayneDance / 90degree
Created March 20, 2019 20:53
90 degree rotation
function rotateImage(a) {
sroot = a[0].length;
b = [0, 0];
swap = 0;
x = 0
a = a.join().split(",");
for(let i = 0; i < a.length; i++){
function firstDuplicate(a) {
first_index = a.length + 1;
swoggle = 0;
index_holder = 0;
for(i = 0; i < a.length; i++){
if(a.includes(a[i], i+1)){
swoggle = 1;
index_holder = a.indexOf(a[i], i+1);
if(first_index > index_holder){
@RayneDance
RayneDance / nodetest.sh
Created January 19, 2019 21:27
nodetest.sh
#!/bin/bash
process=$(ps -aux | grep -v 'grep' | grep "nodejs")
if [ -z "$process" ]; then
/usr/bin/nodejs /var/dndbot/index.js >> /home/alex/nodelog &
else
echo "Nodejs is running"
fi
@RayneDance
RayneDance / ru-cn addresses
Created December 21, 2018 04:05
ru-cn blocklist
/ip firewall address-list
add address=1.80.0.0/13 comment="--Russia & China Address List--" \
list=ru-cn
add address=1.0.0.0/8 list=ru-cn
add address=14.0.0.0/8 list=ru-cn
add address=27.0.0.0/8 list=ru-cn
add address=36.0.0.0/8 list=ru-cn
add address=42.0.0.0/8 list=ru-cn
add address=43.0.0.0/8 list=ru-cn
add address=47.64.0.0/10 list=ru-cn