Skip to content

Instantly share code, notes, and snippets.

@bbtdev
bbtdev / st-new-instance.diff
Created March 23, 2021 05:13
st launches new instance, does not care about cwd
diff -u orig/config.def.h mod/config.def.h
--- orig/config.def.h 2020-06-19 12:29:45.000000000 +0300
+++ mod/config.def.h 2021-03-23 07:05:38.656594165 +0200
@@ -199,6 +199,7 @@
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
+ { TERMMOD, XK_N, newinstance, {.i = 0} },
};
@bbtdev
bbtdev / st-new-desktopentry-0.8.2-with-startupwmclass.diff
Last active March 22, 2021 13:38
you need to create a .desktop file for it and set StartupWMClass in that to whatever the app uses.
From 0ba2850930d2ef22a1774f3dc78884c978f2d8be Mon Sep 17 00:00:00 2001
From: aleks <aleks.stier@icloud.com>
Date: Wed, 27 May 2020 01:20:00 +0200
Subject: [PATCH] Create a desktop-entry for st
---
Makefile | 3 +++
st.desktop | 7 +++++++
2 files changed, 11 insertions(+)
create mode 100644 st.desktop
@bbtdev
bbtdev / st-zoom-cspu-robofont-size.diff
Created March 22, 2021 10:23
rebind zoom to ctrl shift +/- font and font size
diff -u a/config.def.h b/config.def.h
--- a/config.def.h 2020-06-19 12:29:45.000000000 +0300
+++ b/config.def.h 2021-03-22 12:19:09.951353976 +0200
@@ -5,7 +5,7 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
+static char *font = "RobotoMono Nerd Font Mono:pixelsize=30:antialias=true:autohint=true";
static int borderpx = 2;
@bbtdev
bbtdev / st-newterm--with-csn-0.8.2.diff
Last active March 22, 2021 08:32
New term with n instead of return
From a7eedc85e0609177cdb1ed3f6203fa37e6420012 Mon Sep 17 00:00:00 2001
From: Matias Lang <yo@matiaslang.me>
Date: Wed, 17 Jul 2019 01:10:44 -0300
Subject: [PATCH] Add shortcut to spawn new terminal in the current dir
Ctrl-Shift-Return now creates a new ST terminal, whose CWD is the same
as the parent st's CWD
---
config.def.h | 1 +
st.c | 21 +++++++++++++++++++++
rvm pkg install openssl
rvm install 2.5.1 --with-openssl-dir=$HOME/.rvm/usr
https://thepopularman.com/how-i-stopped-hair-loss-and-regrew-hair-for-19-years-and-going-strong/
saw palmetto
bioperine -> This is because black pepper extract has been shown to render topical chemicals more effective
@bbtdev
bbtdev / elixir-rabbitmq-delayed-messages
Created June 29, 2020 06:28
elixir-rabbitmq-delayed-messages
defmodule Testing do
@moduledoc """
Documentation for `Testing`.
"""
@doc """
Hello world.
## Examples
Ordering::Item.joins(:category)
.where(ordering_categories: {categorizable_type: "Ordering::Special"})
# ^ vezi cum e ordering_categories si nu doar categories, deci fac join la doar categories
Ordering::Category
joins("RIGHT JOIN ordering_specials ON ordering_specials.id = ordering_categories.id")
# join si pun eu fieldul de join
.where("ordering_specials.locked = ?", true)
.where("ordering_specials.menuable_type = ?", "Restaurant")
In the man page, we find out that word splitting is an expansion:
"There are seven kinds of expansion performed: brace expansion, tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, WORD SPLITTING*, and pathname expansion.*
Also it describes that this expansion acts on: "results of parameter expansion, command substitution,and arithmetic
expansion that did not occur within double quotes".
Confirmed also by the BashGuide: "Word splitting is performed on the results of almost all unquoted expansions."
In both the guide and man page is specified that Word splitting is dependent on the IFS variable: