Skip to content

Instantly share code, notes, and snippets.

View NanoAi's full-sized avatar
🏠
Working from home

NanoAi NanoAi

🏠
Working from home
View GitHub Profile
@NanoAi
NanoAi / gist:d44d5a90ace8b75c42b364fd642d7711
Created August 7, 2019 00:04
Hide blocked people on Discord (v2)
var headStyle = document.createElement('style');
headStyle.innerHTML = "div[class^=messageGroupBlocked-]{display:none!important;}";
document.head.appendChild(headStyle);
"todo-tree.tags": [
"TODO",
"FIXME",
"STUB",
"NOTE",
],
"todo-tree.labelFormat": "${tag}: ${after}",
"todo-tree.regex": "((--\\[\\[|--|//|#|<!--|;|/\\*|^)\\s*($TAGS)|^\\s*- \\[ \\])",
"todo-tree.grouped": true,
"todo-tree.customHighlight": {
@NanoAi
NanoAi / speak.vbs
Created March 31, 2019 04:53
Text to Speech using cscript.
Dim message, sapi, b
Set sapi=CreateObject("sapi.spvoice")
b = 1
set audioOut = sapi.GetAudioOutputs.Item(1)
strAudio = audioOut.GetDescription
strAudio = strAudio & " (Current)"
Set sapi.AudioOutput = audioOut
WScript.StdOut.Write strAudio & vbCrLf & vbCrLf & "S> "
@NanoAi
NanoAi / DiscordBackgroundImage.js
Last active February 4, 2020 23:48
Discord Background Image
(function () {
var matchStr = "[class^=messagesWrapper] > [class^=scrollerWrap] > [class^=scroller]" // The selection string, Discord might change this...
var imgURL = "https://i.imgur.com/4TiFTqP.jpg"; // Set your image URL here!
var delay = 60 // Higher is slower, Lower is faster but may lag. (This value is in milliseconds!)
var buildObserverX = function() {
let t; // Some micro optimization magic stuff. Is it really needed? Hell if I know...
let x = new MutationObserver(function (e) {
if (t) clearTimeout(t);
t = setTimeout(() => {
@NanoAi
NanoAi / duckduckgo
Created January 9, 2019 00:24
One Dark Pro for DuckDuckGo
https://duckduckgo.com/?kae=t&kam=google-maps&kaj=m&kak=-1&kax=-1&kaq=-1&kao=-1&kap=-1&kp=-2&kw=w&kai=1&kx=60B0ED&kaa=df726f&kj=21242B&k8=B3BDB5&k7=282C35&k9=DF726F
{"kae":"t","kam":"google-maps","kaj":"m","kak":"-1","kax":"-1","kaq":"-1","kao":"-1","kap":"-1","kp":"-2","kw":"w","kai":"1","kx":"60B0ED","kaa":"df726f","kj":"21242B","k8":"B3BDB5","k7":"282C35","k9":"DF726F"}
am=google-maps; aj=m; ak=-1; ax=-1; aq=-1; ao=-1; ap=-1; p=-2; objectKey=03f6a6b82a0819053cb9084a1f08af6ad2997dc0ee81778b47d0b032e844956a9d1a5b6f9025de2acaab9bfb4cb04ad414e8cb362018092dd5991579fde35257; ae=t; w=w; ai=1; aa=df726f; j=21242B; 8=B3BDB5; 7=282C35; 9=DF726F; x=60B0ED
@NanoAi
NanoAi / q.py
Last active July 31, 2018 00:31
q.py aka. My First Python Script!
#!/usr/bin/python3
from filelock import Timeout, FileLock
from time import sleep
from sys import argv
from os import getpid
import argparse
import subprocess
path = "/tmp/.qpy_lock"
lock = FileLock( path, timeout=12 )
@NanoAi
NanoAi / config.yml
Created July 21, 2018 01:14
essentials config
############################################################
# +------------------------------------------------------+ #
# | Notes | #
# +------------------------------------------------------+ #
############################################################
# If you want to use special characters in this document, such as accented letters, you MUST save the file as UTF-8, not ANSI.
# If you receive an error when Essentials loads, ensure that:
# - No tabs are present: YAML only allows spaces
# - Indents are correct: YAML hierarchy is based entirely on indentation
@NanoAi
NanoAi / DiscordModification.js
Last active August 10, 2018 06:35
DiscordModification.js
var imageBlur = document.createElement('style');
var headStyle = document.createElement('style');
var imgCSS = ".da-container img,.da-container video{filter:brightness(-1);-webkit-filter:brightness(-1)}"
imgCSS += ".da-container img:hover,.da-container video:hover{filter:brightness(1)!important;-webkit-filter:brightness(1)!important}"
var injCSS = ".da-messageGroupBlocked{display:none!important;}.emoji-picker .scroller .emoji-item.disabled{opacity:0.2;}";
/* injCSS += ".avatar-large{background-size: 50px 50px;height: 50px;width: 50px;}.emoji.jumboable{height: 48px;width: 48px;}"; */
headStyle.innerHTML = injCSS;
@NanoAi
NanoAi / AngleSpinner.lua
Last active April 19, 2023 19:39
A nice little spinner for Garry's Mod GUI.
local function mouseToAngle(panel, w, h)
local x, y = gui.MousePos()
local globalX, globalY = panel:LocalToScreen(w / 2, h / 2)
local aX = x - globalX
local aY = y - globalY
local cosX = aX / math.sqrt(math.pow(aX, 2) + math.pow(aY, 2))
local ang = ((math.atan2(aY, aX) * 180 / math.pi) * -1) -- math.deg(math.acos(cosX))
@NanoAi
NanoAi / blargh.lua
Last active March 26, 2018 06:45
rrrrrrrrrreeeeeeeeeeeeee
local TOOL = _G.TOOL -- Luadev makes this need to be _G.TOOL otherwise I'd use TOOL.
local liveLoad = false
local gmodTool = {}
if not TOOL then -- If the TOOL variable is not found settup a new variable.
gmodTool = weapons.Get("gmod_tool")
TOOL = getmetatable(gmodTool.Tool.weld):Create()
TOOL.Mode = "mapdefine"
liveLoad = true -- If the TOOL variable does not exist that means we are live loading.
end