1

github cleanup

This commit is contained in:
Evan Pratten 2019-08-27 12:52:46 -04:00
parent e72c824912
commit 6d138a58f1
No known key found for this signature in database
GPG Key ID: 93AC7B3D071356D3
29 changed files with 318 additions and 151 deletions

View File

@ -0,0 +1,48 @@
---
layout: post
title: "I did some cleaning"
description: "Spring cleaning is fun when it isn't spring, and a computer does all the work"
date: 2019-08-27 12:37:00
categories: random
---
As I am continuing to check items off my TODO list before school starts, I have come to an item I have been putting off for a while. **Clean up GitHub Account**. Luckily, I discovered a little trick to make the process of deleting unused repos a little easier!
## Getting a list of repos to delete
I could have automated this, but I prefer a little control. To get the list, start by opening up a new Firefox window with a single tab. In this tab, open your GitHub profile to the list of repos.
Starting from the top, scroll through, and middle click on anything you want to delete. This opens it in a new tab.
Once you have a bunch of tabs open with repos to remove, use [this Firefox plugin](https://addons.mozilla.org/en-US/firefox/addon/urls-list/) to create a plaintext list of every link you opened, and paste the list of links into VS-code.
## Getting an API token
Next, an API token is needed. Go to GitHub's [token settings](https://github.com/settings/tokens), and generate a new one (make sure to enable repository deletion).
## "Parsing" the links
With our new token, and out VS-code file, we can start "parsing" the data.
Pressing `CTRL + F` brings up the Find/Search toolbar. In the text box, there are a few icons. Pressing the one farthest to the right will enable [Regex](https://en.wikipedia.org/wiki/Regular_expression) mode. With this set, paste the following:
```
https://github.com/
```
Now, click the arrow on the left to enable *replace mode*, and put this in the new box:
```
curl -XDELETE -H 'Authorization: token <API token from above>' "https://api.github.com/repos/
```
Then press *replace all*.
Finally, replace the contents of the first box with:
```
\n
```
and the second with:
```
"\n
```
and *replace all* again.
## Deleting the repos
Simply copy the entire text file that was made, and paste it in a terminal, then press \<enter\> (this will take a while)

View File

@ -0,0 +1,9 @@
---
layout: post
title: "Never roll your own crypto!"
description: "My thoughts on this statement"
date: 2019-08-25 22:36:00
categories: random
---
https://security.stackexchange.com/questions/62699/what-if-i-develop-my-own-hash-algorithm-to-create-strong-passwords-from-easy-one

View File

@ -178,7 +178,7 @@ sub rsa4096/0xA61A2F1676E35144 2019-08-11 [] [expires: 2025-08-09]
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -123,7 +123,7 @@ pip3 install tensorflow-gpu #for gpu processing
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -87,7 +87,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -100,7 +100,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -111,7 +111,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -125,7 +125,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -84,7 +84,7 @@ Your browser does not support audio players
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -124,7 +124,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -82,7 +82,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -82,7 +82,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -191,7 +191,7 @@ __<span class="o">()</span> <span class="o">{</span>/???/???/???n?f <span class=
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -112,7 +112,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -177,7 +177,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -101,7 +101,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -174,7 +174,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -95,7 +95,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -187,7 +187,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -107,7 +107,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -152,7 +152,7 @@ ibus-daemon <span class="nt">-drx</span>
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -117,7 +117,7 @@ shift2 <span class="nt">-h</span>
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -0,0 +1,178 @@
<head>
<title>Evan Pratten</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="/assets/css/main.css">
<link rel="stylesheet" href="/assets/css/github-syntax.css">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono:400,400i|IBM+Plex+Sans:100,100i,400,400i,700,700i" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div class="site-ctr">
<!-- Navbar -->
<nav class="navbar navbar-dark sticky-top bg-dark navbar-expand-lg">
<!-- Navbar content -->
<!-- <div class="container"> -->
<a class="navbar-brand" href="/">Evan Pratten</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link" href="/blog">Blog</a>
<a class="nav-item nav-link" href="/projects">Projects</a>
<!-- <a class="nav-item nav-link" href="/documentation">Documentation</a> -->
<a class="nav-item nav-link" href="/about">About</a>
</div>
<!-- </div> -->
</div>
</nav>
<!-- <div style="height:5vh"></div> -->
<!-- Header -->
<!-- <div class="header">
<div class="container">
<div class="content">
</div>
</div>
<div class="header-gap"></div>
</div> -->
<div class="reactive-bg">
<div class="post container">
<h1>I did some cleaning
</h1>
<h4>Spring cleaning is fun when it isn't spring, and a computer does all the work
</h4>
<hr>
<p><em>2019-08-27 08:37:00 -0400
</em></p>
<br>
<p>As I am continuing to check items off my TODO list before school starts, I have come to an item I have been putting off for a while. <strong>Clean up GitHub Account</strong>. Luckily, I discovered a little trick to make the process of deleting unused repos a little easier!</p>
<h2 id="getting-a-list-of-repos-to-delete">Getting a list of repos to delete</h2>
<p>I could have automated this, but I prefer a little control. To get the list, start by opening up a new Firefox window with a single tab. In this tab, open your GitHub profile to the list of repos.
Starting from the top, scroll through, and middle click on anything you want to delete. This opens it in a new tab.</p>
<p>Once you have a bunch of tabs open with repos to remove, use <a href="https://addons.mozilla.org/en-US/firefox/addon/urls-list/">this Firefox plugin</a> to create a plaintext list of every link you opened, and paste the list of links into VS-code.</p>
<h2 id="getting-an-api-token">Getting an API token</h2>
<p>Next, an API token is needed. Go to GitHubs <a href="https://github.com/settings/tokens">token settings</a>, and generate a new one (make sure to enable repository deletion).</p>
<h2 id="parsing-the-links">“Parsing” the links</h2>
<p>With our new token, and out VS-code file, we can start “parsing” the data.</p>
<p>Pressing <code class="highlighter-rouge">CTRL + F</code> brings up the Find/Search toolbar. In the text box, there are a few icons. Pressing the one farthest to the right will enable <a href="https://en.wikipedia.org/wiki/Regular_expression">Regex</a> mode. With this set, paste the following:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>https://github.com/
</code></pre></div></div>
<p>Now, click the arrow on the left to enable <em>replace mode</em>, and put this in the new box:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -XDELETE -H 'Authorization: token &lt;API token from above&gt;' "https://api.github.com/repos/
</code></pre></div></div>
<p>Then press <em>replace all</em>.</p>
<p>Finally, replace the contents of the first box with:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>\n
</code></pre></div></div>
<p>and the second with:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>"\n
</code></pre></div></div>
<p>and <em>replace all</em> again.</p>
<h2 id="deleting-the-repos">Deleting the repos</h2>
<p>Simply copy the entire text file that was made, and paste it in a terminal, then press &lt;enter&gt; (this will take a while)</p>
</div>
</div>
</div>
<!-- <div id="particles-js"></div> -->
<div class="container foot" style="text-align:center;">
<br>
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<!-- Offsets for links -->
<script>
(function ($, window) {
var adjustAnchor = function () {
var $anchor = $(':target'),
fixedElementHeight = 100;
if ($anchor.length > 0) {
window.scrollTo(0, $anchor.offset().top - fixedElementHeight);
}
};
$(window).on('hashchange load', function () {
adjustAnchor();
});
})(jQuery, window);
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-74118570-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-74118570-2');
</script>
<!-- particles -->
<script>
var body = document.body
var particles = document.getElementById("particles-js")
particles.style.height = body.scrollHeight + "px"
console.log(body.scrollHeight)
</script>
<script src="/assets/js/particles.min.js"></script>
<script>
particlesJS.load('particles-js', '/assets/js/particles.json', function () {
console.log('callback - particles.js config loaded');
});
</script>
</body>

View File

@ -64,22 +64,22 @@
Featured Post
</div>
<div class="card-body">
<h5 class="card-title">Keyed data encoding with Python
<h5 class="card-title">I did some cleaning
</h5>
<p class="card-text">XOR is pretty cool</p>
<a href="/blog/2019/08/24/shift2" class="btn btn-primary">View</a>
<p class="card-text">Spring cleaning is fun when it isn't spring, and a computer does all the work</p>
<a href="/blog/2019/08/27/github-cleanup" class="btn btn-primary">View</a>
</div>
</div>
</div> -->
<a href="/blog/2019/08/24/shift2" class="list-group-item list-group-item-action">
<a href="/blog/2019/08/27/github-cleanup" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<div class="card-body">
<h5 class="mb-1">Keyed data encoding with Python
<h5 class="mb-1">I did some cleaning
</h5>
<p class="card-text">XOR is pretty cool</p>
<p class="card-text">Spring cleaning is fun when it isn't spring, and a computer does all the work</p>
</div>
</div>
</a>
@ -92,6 +92,21 @@
<a href="/blog/2019/08/24/shift2" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Keyed data encoding with Python</h5>
<!-- <small>2019-08-24 09:13:00 -0400</small> -->
</div>
<p class="card-text">XOR is pretty cool</p>
</a>
<a href="/blog/2019/08/12/setting-up-ja" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">How I set up ひらがな input on my laptop</h5>
@ -370,7 +385,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -52,7 +52,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

File diff suppressed because one or more lines are too long

View File

@ -88,7 +88,7 @@ https://blog.mrtnrdl.de/feed.xml
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -101,7 +101,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>

View File

@ -146,7 +146,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-24 15:35:35 -0400
This site was last updated at: 2019-08-27 12:52:06 -0400
</span>
</div>