Skip to content

Instantly share code, notes, and snippets.

View Glowman554's full-sized avatar
👿
Tackles you to the floor

Glowman554

👿
Tackles you to the floor
View GitHub Profile
#!/bin/bash
if [ "$1" != "" ]; then
export PREFIX=$1
else
export PREFIX="/usr/local/foxos-x86_64_elf_gcc"
fi
if [ "$2" != "" ]; then
export PROG_PREFIX=$2

get all extensions(windows powershell)

code --list-extensions | % { "code --install-extension $_" }

get all extensions (linux)

code --list-extensions | xargs -L 1 echo code --install-extension

@Glowman554
Glowman554 / auto_bump.py
Created November 22, 2021 18:52
Auto bump discord servers
from requests import post as requestpost
import json
from time import sleep
import argparse
from tqdm import tqdm
def send_self_bot_message(token, channel, body):
while True:
response = requestpost(f"https://discord.com/api/v9/channels/{channel}/messages", json={"content": body}, headers={"Authorization": token})
if response.status_code != 200:
@Glowman554
Glowman554 / exploit.c
Last active February 2, 2022 17:39
pkexec exploit
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
void fatal(char *f) {
perror(f);
@Glowman554
Glowman554 / init.vim
Last active October 27, 2022 06:37
nvim
set nocompatible
filetype off
set t_Co=256
call plug#begin('~/.config/nvim/plugged')
" Python autocomplete
if has('nvim')
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
" Plug 'Shougo/deoplete.nvim'
@Glowman554
Glowman554 / end.gcode
Created June 17, 2023 21:11
Start and end gcode for my anycubic i3 mega s modded with a bltouch probe
M104 S0 ; Extruder off
M140 S0 ; Heatbed off
M107 ; Fan off
G91 ; relative positioning
G1 E-5 F300 ; retract a little
G1 Z+10 E-5 ; X-20 Y-20 F{travel_xy_speed} ; lift print head
G28 X0 Y0 ; homing
G1 Y180 F2000 ; reset feedrate
M84 ; disable stepper motors
G90 ; absolute positioning
@Glowman554
Glowman554 / accelerometer.cfg
Last active September 6, 2023 17:17
Klipper configuration file for Anycubic i3 MEGA S
[mcu pico]
serial: /dev/serial/by-id/usb-Klipper_rp2040_E661640843630F25-if00
[mpu9250]
i2c_mcu: pico
i2c_bus: i2c0a
[resonance_tester]
accel_chip: mpu9250
probe_points:
@Glowman554
Glowman554 / index.ts
Created November 15, 2023 16:54
Simple Discord Voice Message Bot
import { Client, GatewayIntentBits, VoiceBasedChannel, VoiceState } from "npm:discord.js@14.13.0";
import { AudioPlayerStatus, VoiceConnection, createAudioPlayer, createAudioResource, generateDependencyReport, joinVoiceChannel } from "npm:@discordjs/voice@0.16.0";
import _Tweetnacl from "npm:tweetnacl@1.0.3";
interface Config {
token: string;
channelId: string;
mp3: string;
}
@Glowman554
Glowman554 / MorseCode.ino
Created January 1, 2024 16:18
Morse Code Arduino
#ifdef ARDUINO_ARCH_ESP32
#define LED_BUILTIN 2
#endif
char* morse[] = {
(char*) ".-" ,
(char*) "-..." ,
(char*) "-.-." ,
(char*) "-.." ,
(char*) "." ,
@Glowman554
Glowman554 / coc-settings.json
Last active June 11, 2024 19:03
New vim config
{
"coc.preferences.formatOnSave": true,
"diagnostic.virtualText": true,
"diagnostic.virtualTextCurrentLineOnly": false
}