Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Last active June 9, 2019 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyfast/041d9ef7c2795b1c263676a852837868 to your computer and use it in GitHub Desktop.
Save tonyfast/041d9ef7c2795b1c263676a852837868 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
name: add_a_post
channels:
- conda-forge
dependencies:
- ruby
- git
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Warning! <big>This post assumes Github Gist and Git Submodules are good ideas.</big>\n",
"\n",
"> _No! Please don't go yet. I know y'all have feelings. Do a solid. Put them aside because this idea may not suck._\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> Thanks for being a good sport because\n",
"\n",
"`...`\n",
"\n",
"> I bet you have an idea you want to start!\n",
"\n",
"`...`\n",
"\n",
"> See I knew you did. Think about that idea. Take a second and hold on to it a little longer.\n",
"\n",
"`...`\n",
"\n",
"> Cool. Now start typing your idea into a keyboard in the air.\n",
"\n",
"`...`\n",
"\n",
"__That is how it is should be to get started.__\n",
"\n",
"\n",
"\n",
"Some really big ideas start from something very small, sometimes as small as a word. While the following instructions are not this simple, they do lower the barrier to capturing small ideas, with a full revision history."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## User Interfaces\n",
"\n",
"---\n",
"> Isn't it funny how many Python developers write javascript?\n",
"\n",
"> Cool, let's all bang this nail into the ground with our foreheads.\n",
"---\n",
"\n",
"To make an idea quickly, we need to ignore the interface, we should use reliable products that provides user interface services for us. Github and Gitlab revision history services are great examples of products that reliably integrate across many platforms and devices.\n",
"\n",
"**There are so many tools for so many programming tools and word processing tools. You should have the option to use your favorite.**\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## readable `gist` \n",
"\n",
"A blog post can be considered a static artifact with a unique reference identifier; `gist` have `id`s. `gist` are primarily considered for authoring. The contents of a `gist` can contain multiple files that support a readable and reusable repository; with no folders.\n",
"\n",
"> Write the content your future self will want to read."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Let's get to the `gist`\n",
"\n",
"> 🥁\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Github `gist` are the [most boring interface](https://mcfunley.com/choose-boring-technology) to start a _repository_. `gist` lack features, but they can be used with local and cloud development tools for git repositories.\n",
"\n",
"A gist will contain files. Their file extensions and corresponding mimetypes provide insight into what can be acheived with its content. Post processing during publishing stage can refine the views of the gist. _Our intent in this post is create content; good or bad, just start._ \n",
"\n",
"`gist`s are common in programming communities for sharing small snippets of code. They can also be used a publishing tool as blo.cks has demonstrated. They also work on mybinder so notebook users can share single units of thought with their dependencies."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### One reason for gist\n",
"\n",
"They are the easiest thing to share.\n",
"\n",
"[Creating gists](https://help.github.com/en/articles/creating-gists) describes how to use the gist web interface.\n",
"\n",
"> Remember you can drag and drop files into `gist`s, and images into comments."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting postBuild\n"
]
}
],
"source": [
" %%file postBuild\n",
" gem install gist "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we will use the ruby `gist` cli tool.\n",
"\n",
"```bash\n",
"gist --filename readme.md --description \"A new post.\"\n",
"(type a gist. <ctrl-c> to cancel, <ctrl-d> when done)\n",
"A new post\n",
"https://gist.github.com/898fe122f0c3100d07706e2f48473aa8\n",
"```\n",
"\n",
"> conda can used to install ruby."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reusing `gist` - 2 options\n",
"\n",
"### Clone the gist\n",
"\n",
"```bash\n",
"git clone https://gist.github.com/898fe122f0c3100d07706e2f48473aa8 a_new_post\n",
"```\n",
"\n",
"#### Maturing to a repository\n",
"\n",
"[`gist` can mature into a proper repositories](https://stackoverflow.com/questions/13671328/transfer-gist-repo-to-github) with a few git commands.\n",
"\n",
"### Managing `gist`\n",
"\n",
"`gist` lack continuous integration and issue management. These features can be added by managing `gist` within a monorepo (a repository of repositories) using submodules. \n",
"\n",
"```bash\n",
"git submodule add https://gist.github.com/898fe122f0c3100d07706e2f48473aa8 a_new_post\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting environment.yml\n"
]
}
],
"source": [
" %%file environment.yml\n",
" name: add_a_post\n",
" channels:\n",
" - conda-forge\n",
" dependencies:\n",
" - ruby\n",
" - git"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "p6",
"language": "python",
"name": "other-env"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
gem install gist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment