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
| declare module "obsidian" { | |
| interface App { | |
| isMobile: boolean; | |
| } | |
| } | |
| // Call this method inside your plugin's `onLoad` function | |
| function monkeyPatchConsole(plugin: Plugin) { | |
| if (!plugin.app.isMobile) { | |
| return; |
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
| /** | |
| Create pagebreaks in exported Obsidian PDFs. | |
| Example: | |
| # Heading 1 | |
| Lorem Ipsum is simply dummy text of the printing and typesetting industry. | |
| Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, | |
| when an unknown printer took a galley of type and scrambled it to make a type |
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
| :root { | |
| --dark0: #2e3440; | |
| --dark1: #3b4252; | |
| --dark2: #434c5e; | |
| --dark3: #4c566a; | |
| --light0: #d8dee9; | |
| --light1: #e5e9f0; | |
| --light2: #eceff4; |
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
| def minimum_candidate_filter(l): | |
| s=list(map(str, l)) | |
| return [c for c in l if s==s[::-1] and c**(.5)%1==0] | |
| print(minimum_candidate_filter([0, 1000, 121, 676])) |
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
| def func2() -> str: | |
| b="shake" | |
| g,a,c,d,o="gunna", "play", "break", "fake", f"I {b} it off" | |
| def r(z): | |
| return ", ".join([a]*5) | |
| return f""" | |
| Cause the {a}ers {g} {r(a)} | |
| And the haters {r(b)} | |
| Baby, I'm just {g} {r(a)} | |
| {o}{o} |
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
| def func(s) -> str: | |
| return "".join(f"!{c}"*2 for c in s)+"!" |
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
| Process: Sublime Text 2 [11187] | |
| Path: /Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2 | |
| Identifier: com.sublimetext.2 | |
| Version: Beta, Build 2199 (2199) | |
| Code Type: X86-64 (Native) | |
| Parent Process: launchd [151] | |
| Date/Time: 2012-06-14 20:16:31.928 -0400 | |
| OS Version: Mac OS X 10.7.3 (11D50b) | |
| Report Version: 9 |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>name</key> | |
| <string>Refresh</string> | |
| <key>settings</key> | |
| <array> | |
| <dict> | |
| <key>settings</key> |
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
| import sublime, sublime_plugin, re | |
| class ClozeDeletionCommand(sublime_plugin.WindowCommand): | |
| def run(self): | |
| self.window.show_input_panel("Cloze Deletion", "", self.on_done, self.on_change, self.on_cancel) | |
| def on_change(self, inp): | |
| view = self.window.active_view() | |
| sel = view.sel()[0]; |
NewerOlder