start new:
tmux
start new with session name:
tmux new -s myname
| ---@diagnostic disable: undefined-field | |
| -- write_file.lua -------------------------------------------------------------- | |
| ---@class WriteFileToolArgs | |
| ---@field file_path string Absolute path of the file to write | |
| ---@field content string Content to write to the file | |
| ---@class EditFileToolArgs | |
| ---@field file_path string Absolute path of the file to edit | |
| ---@field old_string string The text to replace |
| var getItems = () => Array.from(document.querySelectorAll('.srp-river-results .s-item__price')); | |
| var getPrices = () => getItems().map((item) => parseFloat((item.textContent.match(/\d+.\d+/)[0]))); | |
| var sum = () => getPrices().reduce((a, b) => b + a, 0 ); | |
| var getAvg = () => sum() / getPrices().length; | |
| console.log(getAvg().toFixed(2)); |
| alias ack='rg --color always --no-block-buffered -n -i' | |
| alias acs='apt-cache search' | |
| alias bd='. bd -s' | |
| alias gb='git branch' | |
| alias gca='git add . && git commit --amend -C HEAD && git push -f' | |
| alias gd='git diff' | |
| alias gdc='git diff --cached' | |
| alias gl=" git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
| alias gp='git push -u' | |
| alias gpu='git push -u' |
| require "bundler/inline" | |
| gemfile do | |
| gem "graphql", "1.13.2" | |
| gem "graphql-enterprise", "1.1.0" | |
| end | |
| class BaseField < GraphQL::Schema::Field | |
| include GraphQL::Enterprise::Changeset::FieldIntegration | |
| end |
Modern versions of Windows support GPU paravirtualization in Hyper-V with normal consumer graphics cards. This is used e.g. for graphics acceleration in Windows Sandbox, as well as WSLg. In some cases, it may be useful to create a normal VM with GPU acceleration using this feature, but this is not officially supported. People already figured out how to do it with Windows guests though, so why not do the same with Linux? It should be easy given that WSLg is open source and reasonably well documented, right?
Well... not quite. I managed to get it to run... but not well.
| # The following comments fill some of the gaps in Solargraph's understanding of | |
| # Rails apps. Since they're all in YARD, they get mapped in Solargraph but | |
| # ignored at runtime. | |
| # | |
| # You can put this file anywhere in the project, as long as it gets included in | |
| # the workspace maps. It's recommended that you keep it in a standalone file | |
| # instead of pasting it into an existing one. | |
| # | |
| # @!parse | |
| # class ActionController::Base |
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu
| 1 |
| # Smart pane switching with awareness of vim and fzf and ctrlp | |
| forward_programs="view|n?vim?|ctrlp" | |
| should_forward="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?($forward_programs)(diff)?$'" | |
| bind -n C-h if-shell "$should_forward" "send-keys C-h" "run-shell '[ #{pane_at_left} -eq 1 ] && tmux previous-window || tmux select-pane -L'" | |
| bind -n C-l if-shell "$should_forward" "send-keys C-l" "run-shell '[ #{pane_at_right} -eq 1 ] && tmux next-window || tmux select-pane -R'" | |
| bind -n C-j if-shell "$should_forward" "send-keys C-j" "select-pane -D" | |
| bind -n C-k if-shell "$should_forward" "send-keys C-k" "select-pane -U" | |
| bind -n C-\ if-shell "$should_forward" "send-keys C-\\" "select-pane -l" |