Skip to content

Instantly share code, notes, and snippets.

View itslukej's full-sized avatar
🥑

Luke James itslukej

🥑
View GitHub Profile

Vexera Privacy Policy

When using Vexera, we collect data about you for a better experience.

What personal information do we collect from the people that use Vexera?

  • Public information about your discord server. This is your server ID, server name, server icon, channel names, channel IDs, member IDs and role IDs
  • Public information about the discord server owner. This is their user ID, username and discriminator.
  • Any errors that have occured while using commands and what event from your discord server triggered it.
@itslukej
itslukej / bird6.conf
Last active January 17, 2022 11:34
Linux AnyIP IPv6 setup
router id x;
protocol bgp as62240 {
local as 209808;
source address x;
neighbor x as 62240;
import all;
export filter {
if net ~ [2a06:e881:5404::/48] then accept;
import { toBigIntBE, toBufferBE } from 'bigint-buffer';
export function encode(hash: string) {
const buffer = Buffer.from(hash, "hex");
return [toBigIntBE(buffer.slice(0, 8)), toBigIntBE(buffer.slice(8, 16))];
}
export function decode(first: bigint, second: bigint) {
const buffer1 = toBufferBE(first, 8);
@itslukej
itslukej / Captcha.vue
Created May 1, 2021 18:29
hCaptcha vue but better
<template>
<div ref="container"></div>
</template>
<script>
export default {
data() {
return { id: null };
},
<template>
<div>
<span v-for="n in 5" :key=n>
<fa
:icon="[rating >= n ? 'fas' : 'far', 'star']"
@mouseover="rating = n"
@mouseleave="rating = 0"
@click="$emit('rated', rating)"
/>
</span>
navigator.serviceWorker && navigator.serviceWorker.getRegistrations().then(rs => {
rs.forEach(r => {
if (r.active && r.active.scriptURL.includes('arc-sw.js')) {
r.unregister()
}
});
});
@itslukej
itslukej / ads.js
Last active December 6, 2020 14:05
NitroPay Consent Framework x AdSense
function injectAdSense() {
const script = document.createElement('script');
script.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
script.async = true;
script.setAttribute('data-ad-client', 'ca-pub-XXXXXXXXXXXXXXXX');
document.head.appendChild(script);
}
local shard_id = tonumber(ARGV[3])
local shard_count = tonumber(ARGV[2])
local prefix = 'cache:' .. ARGV[1] .. ':'
local keys = redis.call('keys', prefix .. '*')
local deleted = 0
for i,v in pairs(keys) do
local key = keys[i]
local guild_id = string.sub(key, #prefix + 1)
@itslukej
itslukej / protomap.ts
Last active March 30, 2020 22:40
Simple map-like interface for encoded storage w/ bigint keys
declare class ProtoMessage {
serializeBinary(): Uint8Array;
static deserializeBinary(bytes: Uint8Array): any;
}
export default class ProtoMap<K, V extends ProtoMessage> {
private map: Map<K, ReturnType<ProtoMessage["serializeBinary"]>> = new Map;
constructor(private message: typeof ProtoMessage) {}
use warp::Filter;
use dotenv::dotenv;
use std::env;
#[tokio::main]
async fn main() {
dotenv().ok();
let port = env::var("PORT")
.expect("Port not found")