This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- https://vi.stackexchange.com/questions/9001/how-do-i-search-google-from-vim | |
| local function google_search() | |
| -- Get the current word under the cursor | |
| local current_word = vim.fn.expand '<cword>' | |
| -- Construct the search URL | |
| local search_url = 'http://google.com/search?q=' .. vim.fn.shellescape(current_word) | |
| -- Execute the command to open Google Chrome with the search URL | |
| vim.fn.jobstart({ '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', search_url }, { detach = true }) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -ga terminal-overrides ",screen-256color*:Tc" | |
| set-option -g default-terminal "screen-256color" | |
| set -g status-style "bg=black,fg=#5eacd3" | |
| set -s escape-time 0 | |
| set-option -g status-right "%a %d %b %I:%M %p" | |
| set -g pane-border-style fg=#333333 | |
| set -g pane-active-border-style "bg=default fg=#333333" | |
| unbind % |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vim.keymap.set('n', '<C-b>', function() vim.cmd('Lex 25') end, opt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default class Pointer { | |
| constructor() { | |
| if (instance) return instance | |
| this.px = 0 | |
| this.py = 0 | |
| instance = this | |
| this.init() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| MIT License | |
| Copyright © Joel Whitaker | |
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Generic 1,2,3 Noise | |
| ``` | |
| float rand(float n){return fract(sin(n) * 43758.5453123);} | |
| float noise(float p){ | |
| float fl = floor(p); | |
| float fc = fract(p); | |
| return mix(rand(fl), rand(fl + 1.0), fc); | |
| } |