Skip to content

Instantly share code, notes, and snippets.

View anirudhb's full-sized avatar
👁️‍🗨️
poof

Anirudh anirudhb

👁️‍🗨️
poof
View GitHub Profile
@anirudhb
anirudhb / absolutetouchex-injection.patch
Last active August 10, 2020 03:09
AbsoluteTouchEx patch to inject into existing process
diff --git "a/atdll/atdll.cpp" "b/atdll/atdll.cpp"
index 280349b..22e818c 100644
--- "a/atdll/atdll.cpp"
+++ "b/atdll/atdll.cpp"
@@ -9,6 +9,8 @@
#include <hidsdi.h>
#include <hidpi.h>
#include <hidusage.h>
+#include <TlHelp32.h>
+#include <iostream>
@anirudhb
anirudhb / lcnv-dart-lsp-fixes.patch
Created May 11, 2020 00:45
Patch to improve Dart LSP support for LanguageClient-Neovim
diff --git a/src/language_server_protocol.rs b/src/language_server_protocol.rs
index 1b3d7cb..d38aaf3 100644
--- a/src/language_server_protocol.rs
+++ b/src/language_server_protocol.rs
@@ -1197,6 +1197,14 @@ impl LanguageClient {
related_information: Some(true),
..PublishDiagnosticsCapability::default()
}),
+ code_action: Some(CodeActionCapability {
+ code_action_literal_support: Some(CodeActionLiteralSupport {
@anirudhb
anirudhb / README.md
Last active April 20, 2020 18:29
Copyable text on web (hover for copy button + tooltip)

Copyable text widget on web

Shows a copy button when hovered, then shows a tooltip after copied.

DartPad

@anirudhb
anirudhb / The Ultimate Discord Self-Botting Guide.md
Created March 24, 2020 02:57
The Ultimate Discord Self-Botting Guide

The Ultimate Discord Self-Botting Guide

assuming a frictionless kernel (Ubuntu Linux)

Steps:

  • Setup a [Docker][docker] container running [Ubuntu][ubuntu] and install [Discord][discord] on it
  • Setup [X][x11] permissions, so the container can connect to the running [X][x11] server.
  • Use [xdotool][xdotool] with a shell script to automate input events to [Discord][discord].
@anirudhb
anirudhb / format_string.rs
Last active March 1, 2020 04:07
Format string parser in Rust!
//! Just for prototyping. I'll move this to lib later I promise!
// Pulls in IResult
use nom::IResult;
// Pulls in some useful pre-defined parsers.
use nom::{
bytes::complete::{tag, take_while, take_while_m_n},
character::{
complete::{alpha1, digit1},
@anirudhb
anirudhb / parsing.py
Created August 11, 2019 03:57
Parsing arbitrary arguments using argparse
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--add_argument", help="Add argument for test subcommand",
dest="ext_args", action="append")
subparsers = parser.add_subparsers(help="sub-command help")
test_parser = subparsers.add_parser("test", help="Test subcommand")
@anirudhb
anirudhb / tiny.rs
Created April 20, 2019 04:45
Rust 1.34 Tiny hello world, comparable to C version
// Tiny "Hello, World!" program in Rust.
#![feature(no_core, lang_items)]
#![no_std]
#![no_core]
#![no_main]
#[lang = "panic_info"]
struct PanicInfo {}
#[panic_handler]
fn panic(info: &PanicInfo) -> ! { loop {} }
@anirudhb
anirudhb / protect.py
Last active April 10, 2019 04:50
GH branch protector
import os
import json
from graphqlclient import GraphQLClient
# Set GH_TOKEN environment variable to secret token.
# input on command line.
# Queries and mutations
q_repo = """
query {{
@anirudhb
anirudhb / stub.meta.js
Last active May 1, 2016 21:05
Immortal Wormy Script
// ==Userscript==
// @name Immortal Wormy Script
// @namespace https://gist.github.com/anirudhb
// @version 0.01
// @description Make you an (immortal)[citation needed] wormy!
// @author Anirudh Balaji
// @match http://slither.io
// @grant none
// @updateURL https://gist.githubusercontent.com/anirudhb/ae444a313cadfb4353d7aaa2942bcd7a/raw/stub.meta.js
// @downloadURL https://gist.githubusercontent.com/anirudhb/ae444a313cadfb4353d7aaa2942bcd7a/raw/stub.user.js