After I moved to a static site hosted on GitHub Pages, I was looking at different options to share the code snippets in a better way. Mediahuman youtube downloader 3 9 8 21 (1502) download free. With the Hugo generated static pages, there are a few options for code sharing in an article.
Mar 30, 2017 Works very well for Java code snippets but also works for any other language like HTML, ABABP, PHP etc. You can convert any code fragment from your editor directly to a code template. Highlight the code you'd like to convert to a snippet, context menu 'create snippet', complete the form and done. Snippets: The pro's way of remembering Code snippets help you retrieve and share the technical details behind any implementation. Use snippets to: Recall machine setup instructions openinbrowser; Teach coding techniques openinbrowser; Write great documentation openinbrowser. However, if your store has a custom template/layout, there will be some cases where our app isn't able to do this automatically. Luckily it's super-easy to resolve this issue by adding a code snippet yourself. Once you add the code, your store will automatically call our tracking script at just the right time. Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements. In Visual Studio Code, snippets appear in IntelliSense ( ⌃Space (Windows, Linux Ctrl+Space ) ) mixed with other suggestions, as well as in a dedicated snippet picker ( Insert Snippet in the Command Palette).
You can use the simple pre-formatted text in markdown. This is usually done by enclosing code snippet in ```. This appears (in Hugo Coder theme I am using) as a big black block and has no way to choose the right syntax highlighting based on what programming language the snippet is written in. There are no line numbers or no highlighting of lines in a code snippet and so on.
The second method involves Hugo's default Highlight shortcode. This is a good method that supports line numbers, language type, and line highlights. But, the only shortcoming is that I have to now store the code snippet locally in the same static page. So, if I need to update the code snippet, I end up updating the static page itself.
So, wanted to explore something better and then I found the Gist shortcode in Hugo. Using this shortcode, you can embed a GitHub Gist on a static page. This seemed like a good fit for me since I get the line numbers, language based syntax highlighting, and nothing saved locally in the static page. However, for adding the code snippets as Gists, I first need to upload the Gist and then use it in my article. For this, I need to navigate to the GitHub site and then return once I am done uploading Gists. This is where I found GistPad VS Code extension quite helpful. With this extension in place, I can now create/update/delete Gists right inside VS Code where I am writing all the markdown content for the articles. So, I never have to leave VS Code. Here is how it appears in VS Code.
As you see in the screenshot, I can group all Gists that belong a specific article or category and then simply use them here in an article. With this integration, I simply write all code as a Gist and then use the following syntax to make it appear here.
Simple. I will be using this method of sharing code snippets within an upcoming article series. Stay tuned.
Share on:The best tool to save code snippets online & 5 reasons why
— thiscodeWorks — 3 min read
If you want to get straight to it, the best tool to save code snippets is thiscodeWorks.com.
About 2 years ago when I was learning to code, I was spending way too much time searching for snippets on Google. And a little too much time actually writing down those snippets that worked into my notebook.
Why not use a notes app you say? I tried them. I did. But they'd disappear. Just like my notes, my snippets would get buried below as new snippets would get saved at the top. What I liked about writing them was I could flip through a few pages and visually search my snippets. Half the time I can't even remember what title/name I give to a snippet, so a search bar was never handy. I had to see them.
But as I continued to code and the pages kept growing, this was clearly not a good solution. Not to mention that I had to manually type the snippet every time I needed them.
So as I was discovering the superpower of code and learning I could solve pretty much any problem with code, I immediately knew what I needed to build. A tool to save & organize code snippets.
What I didn't expect was other people to start using it & love it as much as I do. I've found an incredible group of users (or rather they found me), and they constantly share suggestions and feedback that have made the app so much more better than I could've ever imagined.
How To: Distribute Code Snippets
With the help of the community at thiscodeWorks, here's 5 ways we've built it in a way that makes it the best tool to save code snippets online.
1. The code snippets don't disappear
Out of sight, out of mind. That's the problem with most notes apps. Your notes get buried in a list leaving you to only remember the ones you've recently saved, just because they're the first thing you see when you open the app. It's not just remembering what exact terms to search, but even remembering that you had those snippets saved in the first place.
The way code snippets are saved in thiscodeWorks is like a board. When you visit your dashboard, you can straight up see all the snippets you've saved. And even filter them down by language, hashtag, or collection to make scanning easier.
2. No typing or copy/paste to save snippets
One thing I've been appreciating as I continue to code is saving time. Alarmey 2 0 1 – convenient alarm manager. Sometimes you're so deep into programming that you don't even have the time to copy and paste a snippet you've found on Stackoverflow into your notes app. And then when you need it again, you're back to the rabbit hole on Google tracing the links that are purple.
One user suggested a button similar to Pinterest's badge you usually see when you hover over images online. He said how about a button to save code snippets you see online? So I built a Chrome extension that adds a Save button to any code snippet you see online. When you click it, it auto-saves the snippet AND the URL of the page, what it does and even the language. In just one-click!
3. Contextual information
Which brings me to contextual information. Oftentimes when you discover a snippet that's worked for you, there's a lot of added information that makes it useful. Which is why I could never get Github Gists. It only allows you to save the snippet and title?
On thiscodeWorks, in addition to the snippet itself you can save:
- the URL where you found it
- Some descriptive text about where it worked for you or explaining it
- hashtags
4. The Pinterest of code
An interesting outcome of building thiscodeWorks is how it's turned into the Pinterest of Code. A place to not only save & organize your code snippets, but to browse through the collections of others. Just like Pinterest, but for code.
It's always interesting to see what other coders are posting on the homepage and search snippets that have recently worked for others in the community. I'm working on building a personalized feed based on your language preferences and people you follow. So stay tuned ;)
5. Integration with other platforms
As coders in the community have grown from Hello World to software engineers and programming bloggers, there's been a need to share code as much as it is to save it. Therefore, we're working on integrations with other platforms.
The most exciting is where you can embed code snippets saved on thiscodeWorks on Medium, Wordpress and a whole other list of blogging platforms by just pasting the link. This is what it looks like:
Store Code Snippets In Excel
The VS Code extension is in closed beta. If you're interested in being a beta tester, sign up here.
I hope I've convinced you to join the community! :D
Visit https://www.thiscodeworks.com
One thing I've been appreciating as I continue to code is saving time. Alarmey 2 0 1 – convenient alarm manager. Sometimes you're so deep into programming that you don't even have the time to copy and paste a snippet you've found on Stackoverflow into your notes app. And then when you need it again, you're back to the rabbit hole on Google tracing the links that are purple.
One user suggested a button similar to Pinterest's badge you usually see when you hover over images online. He said how about a button to save code snippets you see online? So I built a Chrome extension that adds a Save button to any code snippet you see online. When you click it, it auto-saves the snippet AND the URL of the page, what it does and even the language. In just one-click!
3. Contextual information
Which brings me to contextual information. Oftentimes when you discover a snippet that's worked for you, there's a lot of added information that makes it useful. Which is why I could never get Github Gists. It only allows you to save the snippet and title?
On thiscodeWorks, in addition to the snippet itself you can save:
- the URL where you found it
- Some descriptive text about where it worked for you or explaining it
- hashtags
4. The Pinterest of code
An interesting outcome of building thiscodeWorks is how it's turned into the Pinterest of Code. A place to not only save & organize your code snippets, but to browse through the collections of others. Just like Pinterest, but for code.
It's always interesting to see what other coders are posting on the homepage and search snippets that have recently worked for others in the community. I'm working on building a personalized feed based on your language preferences and people you follow. So stay tuned ;)
5. Integration with other platforms
As coders in the community have grown from Hello World to software engineers and programming bloggers, there's been a need to share code as much as it is to save it. Therefore, we're working on integrations with other platforms.
The most exciting is where you can embed code snippets saved on thiscodeWorks on Medium, Wordpress and a whole other list of blogging platforms by just pasting the link. This is what it looks like:
Store Code Snippets In Excel
The VS Code extension is in closed beta. If you're interested in being a beta tester, sign up here.
I hope I've convinced you to join the community! :D
Visit https://www.thiscodeworks.com
Save Code Chrome Extension: https://www.thiscodeworks.com/extension/chrome
Store Code Snippets
Macpilot 11 0 7 download free. If you have any suggestions or thoughts about how thiscodeWorks could be even better, please write to me at mishka@thiscodeworks.com.