Skip to content

Instantly share code, notes, and snippets.

View R3V1Z3's full-sized avatar

R3V1Z3 R3V1Z3

  • Los Angeles, CA
View GitHub Profile
@R3V1Z3
R3V1Z3 / install-kitty.sh
Last active May 4, 2022 10:08
Installer script for Kitty terminal on elementary OS, or Ubuntu derivatives in general
#!/usr/bin/env bash
# ensure freetype is updated, important to avoid error:
# undefined symbol: FT_Get_Var_Blend_Coordinates
sudo add-apt-repository ppa:glasen/freetype2
sudo apt update && sudo apt install freetype2-demos
# kitty installer script from https://sw.kovidgoyal.net/kitty/binary.html#manually-installing
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
@R3V1Z3
R3V1Z3 / subtle.kak
Created August 22, 2018 20:54
Dark color scheme for Kakoune with mostly subtle, legible editor colors and vibrant menus that stand out.
# code
face global value rgb:ffffff,default
face global type rgb:dedede,default
face global identifier rgb:dedede,default
face global string rgb:aaccaa,default
face global error default,rgb:ffffff
face global keyword rgb:bbbbbb,default+b
face global operator rgb:dedede,default
face global attribute rgb:ccaaaa,default
@R3V1Z3
R3V1Z3 / vscode-snakecase-to-camelcase.md
Last active October 31, 2024 15:10
Convert all occurrences of snake_case to camelCase in VS Code. Windows/Linux walk-through here: https://youtu.be/vlHel1fN5_A

Convert snake_case to camelCase in VS Code

  • Press CTRL-H ( ⌥⌘F on Mac ).
  • Press ALT-R ( ⌥⌘R on Mac ).
  • Type _([a-zA-Z]).
  • Press TAB and type $1.
  • Press ALT-ENTER ( ⌥ENTER on Mac ).
  • Press F1 and type upper, then press ENTER.
  • Press CTRL-ALT-ENTER ( ⌥ENTER on Mac ).

Convert snake_case to camelCase in Vim

Vim replace operation to convert snake_case to camelCase (credits @Sean C.): %s/_\([a-zA-Z]\)/\u\1/g

What's it for?

Automatically refactor a script's symbol names from snake_case to camelCase.

How to use it?


▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
▓ █
▓ █
▓ █
▓ █
▓ ██████████████████████ █
▓ ████████████████████████████████ █ █
▓ █ ████████████ █
▓▓▓▓▓▓▓▓▓▓ █ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ █ █
DECLARE SUB PrintSomeStars (StarCount!)
REM QuickBASIC example
INPUT "What is your name: ", UserName$
PRINT "Hello "; UserName$
DO
INPUT "How many stars do you want: ", NumStars
CALL PrintSomeStars(NumStars)
DO
INPUT "Do you want more stars? ", Answer$
LOOP UNTIL Answer$ <> ""
<?php
// the query
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<!-- pagination here -->
<!-- the loop -->
@R3V1Z3
R3V1Z3 / static-ascii.txt
Last active June 22, 2018 21:05
"Static" logo in ASCII. Check it in glory: https://git.io/f4yg6
SSSSSSSSSSSSS
SSSSSSS...SSS...SSSSSSS
SSSS.........SSS.........SSSS
SSS............SSS............SSS
TTT..............TTT..............TTT
TTT................TTTT...............TTT
TTT....................TTTTT............TTT
TTT......................TTTTT............TTT
AA...................AAAAAA................AA
AAA...............AAAAA.....................AAA
/*
Theme name: Instruments of Mercy
*/
@import url('https://fonts.googleapis.com/css?family=Slabo+27px|Josefin+Slab');
$color: burlywood;
$srotateY: 357; /* .gd-slides {$gd_slider_srotateY="357,0,360,1,deg"} */
$srotateZ: 4; /* .gd-slides {$gd_slider_srotateZ="4,0,360,1,deg"} */
$eqrotateY: 358; /* .gd-slides {$gd_slider_eqrotateY="358,0,360,1,deg"} */