<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cary Miller</title>
    <description>The latest articles on DEV Community by Cary Miller (@cmilr).</description>
    <link>https://dev.to/cmilr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1704%2F1188cfeb-252e-4373-9830-c795069f66fd.png</url>
      <title>DEV Community: Cary Miller</title>
      <link>https://dev.to/cmilr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cmilr"/>
    <language>en</language>
    <item>
      <title>Grab Your GitHub URLs Without Leaving The Command Line</title>
      <dc:creator>Cary Miller</dc:creator>
      <pubDate>Wed, 13 Sep 2017 16:00:09 +0000</pubDate>
      <link>https://dev.to/cmilr/grab-your-github-urls-without-leaving-the-command-line</link>
      <guid>https://dev.to/cmilr/grab-your-github-urls-without-leaving-the-command-line</guid>
      <description>&lt;p&gt;In keeping with my previous post about &lt;a href="https://dev.to/cmilr/initialize-populate-and-post-your-git-repo-to-github-in-a-single-step"&gt;initializing, populating, and posting a repo to GitHub in just one step&lt;/a&gt;, I thought I'd share a quick one-liner bash alias I use for listing my GitHub urls on the command line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias ghrepos="curl -s -i -H 'Authorization: token $GHUB_TOKEN' \
    https://api.github.com/user/repos | grep -o 'https://github.com[^\"]*.git'"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use the above alias, you'll just need to replace $GHUB_TOKEN with your own &lt;strong&gt;&lt;em&gt;Personal Access Token&lt;/em&gt;&lt;/strong&gt; from GitHub.&lt;/p&gt;

&lt;p&gt;There are many benefits to having this function at your fingertips—you can use it to quickly: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to a repo's url.&lt;/li&gt;
&lt;li&gt;Clone a repo to your local machine.&lt;/li&gt;
&lt;li&gt;Or just peruse your remote repos in one simple list, like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ghrepos

https://github.com/cmilr/Atom-Prefs.git
https://github.com/cmilr/Bash-Prefs.git
https://github.com/cmilr/Blender-Playground-v1.1.git
https://github.com/cmilr/Blender-Prefs.git
https://github.com/cmilr/CMillerCo-HTML.git
https://github.com/cmilr/CMillerCo-Rails.git
https://github.com/cmilr/DeadSimple-Blender-3D-Cheat-Sheet.git
https://github.com/cmilr/DeadSimple-Pixel-Perfect-Camera.git
https://github.com/cmilr/Git-Beautify-For-MacOS-Terminal.git
https://github.com/cmilr/HTML-Essential-Training.git
https://github.com/cmilr/iOS-Postprandial-Timer.git
https://github.com/cmilr/iOS-Programming-Big-Nerd-Ranch.git
https://github.com/cmilr/iOS-SwiftCalc.git
https://github.com/cmilr/Learning-iOS-App-Dev-1.git
https://github.com/cmilr/Learning-iOS-App-Dev-2.git
https://github.com/cmilr/Learning-iOS-App-Dev-3.git
https://github.com/cmilr/Unity2D-Components.git
https://github.com/cmilr/Unity3D_ImporterDefaults.git
https://github.com/cmilr/Visual-Studio-For-Mac-Dark-Syntax-HoneyBees.git
https://github.com/cmilr/VS-Prefs.git
https://github.com/cmilr/Xcode-Prefs.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you find this as useful as I do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks for stopping by!
&lt;/h2&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>bash</category>
    </item>
    <item>
      <title>Initialize, Populate, and Post Your Git Repo to GitHub in a Single Step</title>
      <dc:creator>Cary Miller</dc:creator>
      <pubDate>Tue, 23 May 2017 16:23:21 +0000</pubDate>
      <link>https://dev.to/cmilr/initialize-populate-and-post-your-git-repo-to-github-in-a-single-step</link>
      <guid>https://dev.to/cmilr/initialize-populate-and-post-your-git-repo-to-github-in-a-single-step</guid>
      <description>&lt;p&gt;I don't know about you, but I'm a bit obsessed with saving time... in fact, I'm pretty sure I put more energy into saving time than I do working on my code (oh man, that's a discussion for another day.)&lt;/p&gt;

&lt;p&gt;Anyway, I like having my code up on GitHub, but I get annoyed that I have to break away from the IDE or terminal to do it—navigating a browser can just feel so SLOOOOW.&lt;/p&gt;

&lt;p&gt;So I threw together this simple function that makes it fast and easy to get a project up on GitHub, and I thought I'd share it. Once you have it set-up, &lt;strong&gt;&lt;em&gt;it's literally a one-step deal.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Other than git, a GitHub account, and a bash terminal, the only real dependency here is &lt;a href="https://github.com/github/hub"&gt;&lt;strong&gt;hub&lt;/strong&gt;&lt;/a&gt;, the excellent git command line tool.&lt;/p&gt;

&lt;p&gt;I work on a Mac, so I installed hub via &lt;a href="https://brew.sh/"&gt;homebrew&lt;/a&gt;—&lt;em&gt;$ brew install hub&lt;/em&gt;—but you can peruse their GitHub page for &lt;a href="https://github.com/github/hub"&gt;more installation options&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you've got hub installed and working, you should be able to drop something like the following code into your &lt;strong&gt;.bash_profile&lt;/strong&gt; (making sure to replace the paths with ones relevant to your own development environment,) and use it to build a new repo in just one step.&lt;/p&gt;

&lt;p&gt;The function below automatically creates a folder in my local &lt;strong&gt;Repos/&lt;/strong&gt; directory, initializes a repository inside of it, populates the repo with default &lt;strong&gt;README&lt;/strong&gt;, &lt;strong&gt;LICENSE&lt;/strong&gt;, and &lt;strong&gt;.gitignore&lt;/strong&gt; files, and then goes on to create a remote GitHub repo, track it, and push a first commit. It finishes up by opening my browser to the GitHub repo so I can verify everything and add a description if I like... &lt;strong&gt;&lt;em&gt;All from a single click&lt;/em&gt;&lt;/strong&gt;. :)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;function &lt;/span&gt;mkpub &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"What would you like to name your repository? "&lt;/span&gt;
    &lt;span class="nb"&gt;read &lt;/span&gt;name
    &lt;span class="c"&gt;#Replace with a local path to your repos&lt;/span&gt;
    &lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s1"&gt;'/CMiller/Dev/Repos/'&lt;/span&gt;
    &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;
    &lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;
    git init
    &lt;span class="c"&gt;#Replace with local paths to any default files you'd like to include&lt;/span&gt;
    &lt;span class="c"&gt;#Note: the -f flag forces overwrite; use -i for interactivity if you prefer&lt;/span&gt;
    &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s1"&gt;'/CMiller/Dropbox/Dev/GitInit/Public/README.md'&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
    &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s1"&gt;'/CMiller/Dropbox/Dev/GitInit/Public/LICENSE'&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
    &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s1"&gt;'/CMiller/Dropbox/Dev/GitInit/.gitignore'&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
    hub create
    git add &lt;span class="nb"&gt;.&lt;/span&gt;
    git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"First commit: add README, LICENSE, and .gitignore."&lt;/span&gt;
    git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin master
    hub browse
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, to create a function for making private repos instead of public ones, simply add a '-p' flag to the 'hub create' line above—&lt;em&gt;hub create -p&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I hope you find this useful. &lt;/p&gt;

&lt;h3&gt;
  
  
  Thanks for stopping by!
&lt;/h3&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>bash</category>
    </item>
    <item>
      <title>Hi, I'm Cary Miller</title>
      <dc:creator>Cary Miller</dc:creator>
      <pubDate>Mon, 22 May 2017 19:41:58 +0000</pubDate>
      <link>https://dev.to/cmilr/hi-im-cary-miller</link>
      <guid>https://dev.to/cmilr/hi-im-cary-miller</guid>
      <description>&lt;p&gt;I wrote my first BASIC program on a Commodore CBM/PET computer 35 years ago, and I've been coding in an on-again/off-again fashion ever since.&lt;/p&gt;

&lt;p&gt;These days I'm mostly programming native iOS apps in Swift and Xcode, but I also do a lot of fun/creative stuff in C# with the Unity game engine, and of course Blender (yay FOSS!)&lt;/p&gt;

&lt;p&gt;You can find me on GitHub as &lt;a href="https://github.com/cmilr" rel="noopener noreferrer"&gt;cmilr&lt;/a&gt;, or over at my company website at &lt;a href="http://cmillerco.com" rel="noopener noreferrer"&gt;cmillerco.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nice to meet you!&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
