Skip to content

Instantly share code, notes, and snippets.

@kebien6020
kebien6020 / sankaku-ads.user.js
Last active August 23, 2024 03:07
Sankaku ads
// ==UserScript==
// @name Sankaku ads
// @namespace http://tampermonkey.net/
// @version 0.16
// @description Auto close sankaku ads
// @author Baku
// @match https://beta.sankakucomplex.com/*
// @match https://www.sankakucomplex.com/*
// @match https://sankaku.app/*
// @updateURL https://gist.github.com/kebien6020/6e709478155f41901a2f2bd7197f78bd/raw/sankaku-ads.user.js
@kebien6020
kebien6020 / vec_vs_list.cpp
Last active June 30, 2023 04:01
Benchmark testing vector vs list for different sized elements
// Compile:
// g++ -O3 -std=c++20 -lbenchmark main.cpp -o main
// You need google benchmark installed to compile: https://github.com/google/benchmark
// Run:
// ./main
#include <benchmark/benchmark.h>
#include <array>
#include <iterator>
@kebien6020
kebien6020 / userscript.user.js
Last active April 3, 2022 05:14 — forked from oralekin/userscript.user.js
osu! Logo Template for 2022 /r/place
// ==UserScript==
// @name osu! Logo template
// @namespace http://tampermonkey.net/
// @version 0.4
// @description try to take over the canvas!
// @author oralekin, LittleEndu, ekgame
// @match https://hot-potato.reddit.com/embed*
// @match https://www.reddit.com/r/place*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @require https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js
@kebien6020
kebien6020 / dot.sh
Last active July 17, 2021 05:52
Run dot container
#!/bin/sh
echo $SSH_AUTH_SOCK
chown 1000:1000 $SSH_AUTH_SOCK
docker run -itd --name dot -v projects:/home/kevin/projects -v /var/run/docker.sock:/var/run/docker.sock -v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent kevinpena/dot
docker exec -it dot bash
docker rm -f dot
// ==UserScript==
// @name Streaming live translate
// @namespace youtube.com
// @version 0.8
// @author u/BakuhatsuK
// @description Get streaming translation comments easily. Based on extension made by u/konokalahola
// @include https://*.youtube.com/watch*
// @run-at document-start
// @updateURL https://gist.github.com/kebien6020/e18b489e40cd3767b1badcbb4d8b431c/raw/live-tranlation.user.js
// ==/UserScript==
@kebien6020
kebien6020 / SankakuButtonToOldSite.user.js
Last active April 30, 2019 04:22
Go to the old site at the current image clicking an orange circle at the bottom. This circle turns blue if the image has notes.
// ==UserScript==
// @name Button to old page
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Show a button to go to the old site!
// @author Baku
// @updateURL https://gist.github.com/kebien6020/f6489944130a8d891dbebffbe4388b08/raw/SankakuButtonToOldSite.user.js
// @downloadURL https://gist.github.com/kebien6020/f6489944130a8d891dbebffbe4388b08/raw/SankakuButtonToOldSite.user.js
// @match https://beta.sankakucomplex.com/*
// @grant none
# Don't cd $HOME
set-environment -g CHERE_INVOKING 1
# Change windows / resize panes using the mouse
set -g mouse on
# True color
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
=SIFECHA(D17,E17,"y")&" años, "
&SIFECHA(D17,E17,"ym")&" meses, "
&E17-FECHA(AÑO(E17),MES(E17),1)&" dias"
@kebien6020
kebien6020 / ExcelExportAsPDF.vba
Last active April 25, 2018 14:05
Excel macro to Instantly export as pdf in the same folder
Sub ExportAsPDF()
'Instantly export as pdf in the same folder
Dim filename As String
filename = ActiveWorkbook.FullName
filename = Replace(filename, ".xlsm", ".pdf")
filename = Replace(filename, ".xlsx", ".pdf")
filename = Replace(filename, ".xls", ".pdf")
filename = Replace(filename, ".xlb", ".pdf")
ActiveWorkbook.ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
@kebien6020
kebien6020 / Module1.vba
Last active April 25, 2018 14:02
Unlock Excel VBA code
' Paste this into Module 1 of a new workbook
' Credit https://stackoverflow.com/a/27508116
Option Explicit
Private Const PAGE_EXECUTE_READWRITE = &H40
Private Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Long, Source As Long, ByVal Length As Long)
Private Declare Function VirtualProtect Lib "kernel32" (lpAddress As Long, _