Skip to content

Instantly share code, notes, and snippets.

@atenni
atenni / README.md
Last active July 5, 2024 12:58
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@zer4tul
zer4tul / weechat.md
Last active August 21, 2021 21:12
A Simple, Base16 Friendly, Weechat Setup

A Simple, Base16 Friendly, Weechat Setup

Scripts

  • Some must-have scripts
  /script install buffers.pl buffer_autoclose.py iset.pl go.py colorize_nicks.py
@philc
philc / gist:e849b48e6c5f32592d62
Created July 21, 2014 01:05
A script to copy Chrome's search engine settings into Vimium's settings format
#!/bin/sh
# This script lists user defined search engines in Chromium.
# It replaces {inputEncoding}, which appears in some search engine definitions, with
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens.
# Location of Chromium's 'Web Data' SQLite3 file
CHROMIUM_WEB_DATA="$HOME/.config/chromium/Default/Web Data"
# Location to create temporary copy of 'Web Data', since the database is locked while
<?php
/**
* Automatically alias Laravel Model's to their base classname.
* Ex: "App\Models\User" now can just be accessed by "User"
*/
if (! function_exists('aliasModels')) {
function aliasModels() {
$finder = new \Symfony\Component\Finder\Finder();
$finder->files()->name('*.php')->in(base_path().'/app');
@fnky
fnky / ANSI.md
Last active July 8, 2024 11:54
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@miahmie
miahmie / Readme.md
Last active July 10, 2022 08:44
旧KAG3系の実装でもquakeが使いたい@吉里吉里Z

吉里吉里ZにはsetLayerPosが廃止されているので…

quakeタグが使えない,といっても割とどうとでもなります。 現に,

KAG3 for 吉里吉里Z や, 鱧入りKAG3 for 吉里吉里Z

では普通にquakeタグは使えるようになっています。(実際のところ揺らす先を変更しているだけ)

@sineemore
sineemore / st-proper-alpha-0.8.2.diff
Last active March 16, 2021 23:04
proper st alpha patch with premultiplied colors
diff --git a/config.def.h b/config.def.h
index 546edda..4f3e806 100644
--- a/config.def.h
+++ b/config.def.h
@@ -82,6 +82,9 @@ char *termname = "st-256color";
*/
unsigned int tabspaces = 8;
+/* bg opacity */
+float alpha = 0.8;
# Name: softdenchi_remove.py
#
# Usage: Drag game.exe onto softdenchi_remove.py.
# This will make a new exe in the same location as game.exe.
#
# Process: SoftDenchi is a DRM that requires you to run its parent program in
# the background before it will run the protected binary. The parent
# service behaves eerily similar to malware in that it is constantly
# running in the background, even when you aren't using applications
# protected by it. The parent service UCManSvc is somewhat intricate
@agyild
agyild / FSR.glsl
Last active July 7, 2024 16:02
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in