Skip to content

Instantly share code, notes, and snippets.

View leVoT8's full-sized avatar
🏠
Working from home

leVoT8 leVoT8

🏠
Working from home
  • EMPA
  • New York
View GitHub Profile
@leVoT8
leVoT8 / Code.gs
Created October 31, 2022 08:59 — forked from Yagisanatode/Code.gs
# AppsScript---Find-and-Replace-Text-With-a-link-in-Google-Docs Three examples on how to find text in a Google Doc and replace it with new text and a link with Google Apps Script's DocumentApp Class.
// Link to the tutorial: https://yagisanatode.com/2021/05/16/how-to-find-and-replace-text-in-a-google-doc-with-a-link-or-a-list-of-links-with-google-apps-script/
/**
* Find an replace text with a single link where there is no
* other text in the paragraph.
*/
function singleLink() {
// ## Inputs ##
let text = "My URL";
let url = "https://yagisanatode.com/";
@leVoT8
leVoT8 / .md
Created November 22, 2021 16:48
Goku Karabiner
;; main                -> {:main [{:des "..." :rules [rule1 rule2 ...]}]}
;; manipulator         -> {:des "..." :rules [rule1 rule2 ...]}
;; manipulator's rules -> [rule1 rule2 ...]
 {:main [{:des "a to 1, b to 2, c to insert 1 2 3"
         :rules [[:a :1] [:b :2] [:c [:1 :2 :3]]]}]}

{:main [{:des "simultaneous j l press to F19" :rules [[[:j :l] :f19]]}]}
;; rule [[:j :l] :f19]
;;       <from>  <to>
@leVoT8
leVoT8 / gumroad.js
Created September 10, 2021 03:57 — forked from matsubo/gumroad.js
function receiveMessage(a) {
if (!document.getElementById(Gumroad.activeIframeId)) return;
if (document.getElementById(Gumroad.activeIframeId).getAttribute("src").indexOf(a.origin) != "0") return;
var b = a.data.split(" ")[0];
b == "close" && Gumroad.close()
}
var Gumroad = Gumroad || {
urlBlackList: ["/signup", "/login", "/logout", "/admin", "/settings", "/library", "/filtered_customer_count", "/customers", "/customers_switch_product", "/purchases", "/users", "/demo", "/products", "/dashboard", "/analytics", "/balance", "/confirm", "/crossdomain", "/api", "/developers", "/ping", "/webhooks", "/revenue_share", "/jobs", "/team", "/press", "/terms", "/privacy", "/blog-posts", "/faq", "/about", "/about", "/how-it-works", "/overlay", "/embed", "/modal", "/button", "/next-steps", "/charge", "/charge_data", "/CHARGE", "/examplify", "/deck", "/guide"],
init: function () {
if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match
@leVoT8
leVoT8 / sublime-command-line.md
Created August 21, 2021 01:20
Launch Sublime Text from the command line on OSX

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

@leVoT8
leVoT8 / README.md
Created May 14, 2021 17:33 — forked from magnetikonline/README.md
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@leVoT8
leVoT8 / Sed.sh
Created September 6, 2020 00:14
SED Commands
SELECTIVE PRINTING OF CERTAIN LINES:
# print first 10 lines of file (emulates behavior of "head")
sed 10q
# print first line of file (emulates "head -1")
sed q
# print the last 10 lines of a file (emulates "tail")
sed -e :a -e '$q;N;11,$D;ba'
@leVoT8
leVoT8 / commands.sh
Created September 5, 2020 20:24
Shell #Shell #Common #Commands
a='Hello'
b='World'
c="${a} ${b}"
echo "${c}"
#> Hello World
adding to an editor
``export EDITOR='program'``
restart bash