Skip to content

Instantly share code, notes, and snippets.

View keyle's full-sized avatar
👹

keyle

👹
View GitHub Profile
@hyperupcall
hyperupcall / settings.jsonc
Last active January 8, 2025 13:29
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@almonk
almonk / Notify.swift
Last active March 27, 2023 07:55
A little wrapper for NSNotifications with Swift
//
// Notify.swift
//
import Foundation
class Notify {
static let shared = Notify()
func send(event: NSNotification.Name) {
@xezrunner
xezrunner / xz_pre-commit-nocheckin
Last active December 14, 2024 11:01
Git nocheckin pre-commit hook (with error message and grep output)
#!/bin/bash
# Author: xezrunner (github.com/xezrunner)
# Credit: DustinGadal on r/Jai
# https://www.reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/gbfhzd1/
# Required programs/utilities for default behavior (as-is):
# git, grep, xargs
# This pre-commit hook/script checks for the existence of the word "$SEARCH_TARGET"
# in your *staged* source files, then aborts the commit if any matches were found.
@byte-sourcerer
byte-sourcerer / MacEditorTextView.swift
Created October 31, 2021 10:46
An NSTextView wrapped by SwiftUI with TextKit 2
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://twitter.com/tholanda
*
* MIT license
* Modified by https://github.com/cjwcommuny for TextKit 2
*/
import Combine
.toolbar {
ToolbarItemGroup {
Button(action: {}, label: {
Image(systemName: "sidebar.left")
})
Spacer()
Button(action: {}, label: {
Image(systemName: "play.fill")
})
Button(action: {}, label: {
@uheartbeast
uheartbeast / ChromaticAberration.shader
Created August 27, 2019 14:42
Simple Chromatic Aberration Shader for Godot 3
shader_type canvas_item;
uniform bool apply = true;
uniform float amount = 1.0;
uniform sampler2D offset_texture : hint_white;
void fragment() {
vec4 texture_color = texture(TEXTURE, UV);
vec4 color = texture_color;
@maoueh
maoueh / main.go
Last active September 8, 2024 17:50
golang gorilla mux sub/router + specific middleware per subrouter
package main
import (
"time"
"fmt"
"net/http"
"github.com/gorilla/mux"
)
func main() {
@NicholasBellucci
NicholasBellucci / ScrollingTextView.swift
Last active March 1, 2024 03:37
MacOS swift marquee scrolling text view
import Cocoa
open class ScrollingTextView: NSView {
// MARK: - Open variables
/// Text to scroll
open var text: NSString?
/// Font for scrolling text
open var font: NSFont?
@giodamelio
giodamelio / outline-bookmarklet.js
Last active April 4, 2022 13:01
A bookmarklet to process the current page to Outline.com and redirect afterwards.
fetch(
"https://outlineapi.com/v3/parse_article?source_url=" +
encodeURIComponent(window.location)
)
.then(res => res.json())
.then(body => {
if (body.error) {
return alert(`Outline Bookmarklet Error: ${body.error}`);
}
window.location.href = `https://outline.com/${body.data.short_code}`
@Adrodoc
Adrodoc / tetris.lua
Last active October 19, 2021 07:39
tetris.lua
require 'mickkay.wol.Spell'
tetris = {}
tetris.delay = 10
tetris.origin = Vec3(453985, 80, -888253)
tetris.width = 10
tetris.height = 20
tetris.rotationCenter = Vec3(0,-1,0)
local upperCenter = tetris.origin + Vec3(tetris.width//2 + 1, tetris.height-1, 0)