Skip to content

Instantly share code, notes, and snippets.

@aidilfbk
aidilfbk / disableSelection.jquery.js
Created August 14, 2010 11:48
jQuery plugin to prevent selection of text
// Usage: $("elements").disableSelection()
(function($){
$.fn.extend({
disableSelection : function() {
return this.each(function() {
this.onselectstart = function(){return false;};
this.unselectable = "on";
jQuery(this).css({'-moz-user-select': 'none', '-webkit-user-select': 'none', 'user-select': 'none');
});
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 2, 2024 02:36
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@jr-codes
jr-codes / script.user.js
Created November 16, 2012 06:10
Userscript Boilerplate
// ==UserScript==
// @name Userscript Name
// @namespace http://example.com/
// @description Userscript Description
// @match http://example.com/* (or @include * to include all pages)
// @version 1.0
// ==/UserScript==
// Emulate Greasemonkey's unsafeWindow in Chrome
window.unsafeWindow = window.unsafeWindow || (function() {
@dinh
dinh / script.user.js
Created November 30, 2023 19:58 — forked from jr-codes/script.user.js
Userscript Boilerplate
// ==UserScript==
// @name Userscript Name
// @namespace http://example.com/
// @description Userscript Description
// @match http://example.com/* (or @include * to include all pages)
// @version 1.0
// ==/UserScript==
// Emulate Greasemonkey's unsafeWindow in Chrome
window.unsafeWindow = window.unsafeWindow || (function() {
@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active May 2, 2024 02:34
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.

@dinh
dinh / background .js
Last active May 2, 2024 02:33
[chrome.webRequest.onBeforeSendHeaders] usage #chrome #webRequest
//https://chrome.google.com/webstore/detail/header-editor/pkokmcnklmgbepioackopoknkdlhefjl
(function() {
var transformHeaders = function(headers) {
// [ { name: "", value: "" } ]
var list = [];
for (var i = 0; i < headers.length; i++) {
var header = headers[i];
@nimone
nimone / Sidebar.jsx
Created June 29, 2023 09:33
Retractable Sidebar Component purely in ReactJS and TailwindCSS
import { MoreVertical, ChevronLast, ChevronFirst } from "lucide-react"
import { useContext, createContext, useState } from "react"
const SidebarContext = createContext()
export default function Sidebar({ children }) {
const [expanded, setExpanded] = useState(true)
return (
<aside className="h-screen">
@AndreasMadsen
AndreasMadsen / index.html
Created September 17, 2015 20:05
chrome-bug
<!DOCTYPE html>
<meta charset="utf8">
<title>dprof visualizer</title>
<style>
/* general page layout */
html, body {
margin: 0;
height: 100%;
}
extends Camera2D
const SCREEN_SIZE := Vector2( 320, 180 )
var cur_screen := Vector2( 0, 0 )
func _ready():
set_as_toplevel( true )
global_position = get_parent().global_position
_update_screen( cur_screen )
@brpaz
brpaz / markdown-cheatsheet.md
Created February 1, 2019 22:22
A better markdown cheatsheet.