Skip to content

Instantly share code, notes, and snippets.

@sirodoht
sirodoht / crawl_404.sh
Created March 12, 2016 20:39
Crawl your site for 404's
$ wget --spider -r -p http://www.cronweekly.com 2>&1 | grep -B 2 ' 404 '
--2016-03-09 22:08:14-- https://www.cronweekly.com/three-tiers-package-managers/
Reusing existing connection to www.cronweekly.com:443.
HTTP request sent, awaiting response... 404 Not Found
@sirodoht
sirodoht / crawl_no200.sh
Created March 12, 2016 20:40
Crawl your site for anything but HTTP 200's
$ wget --spider -r -o ~/crawl_results.log -p http://www.cronweekly.com 2>&1
$ cat ~/crawl_results.log
...
--2016-03-09 22:13:16-- https://www.cronweekly.com/
Reusing existing connection to www.cronweekly.com:443.
HTTP request sent, awaiting response... 200 OK
2016-03-09 22:13:16 (114 MB/s) - 'www.cronweekly.com/index.html' saved [17960]

Keybase proof

I hereby claim:

  • I am sirodoht on github.
  • I am sirodoht (https://keybase.io/sirodoht) on keybase.
  • I have a public key ASDcpYHS9KAFzHS1HAOqlyqgLbuv6CXqQnxZtWDhAriFfQo

To claim this, I am signing this object:

Vim provides many ways to move the cursor. Becoming familiar with them leads to more effective text editing.
h move one character left
j move one row down
k move one row up
l move one character right
w move to beginning of next word
b move to previous beginning of word
e move to end of word
W move to beginning of next word after a whitespace
@sirodoht
sirodoht / embed-examples.html
Last active December 21, 2016 11:57
Web embed examples
<!-- Twitter single Tweet -->
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">
<a href="https://twitter.com/hashtag/Overusing?src=hash">#Overusing</a> <a href="https://twitter.com/hashtag/hashtags?src=hash">#hashtags</a> can be <a href="https://twitter.com/hashtag/super?src=hash">#super</a> <a href="https://twitter.com/hashtag/annoying?src=hash">#annoying</a> 😩 Sticking to one or two per Tweet is a good call 😀</p>&mdash; Twitter Support (@Support) <a href="https://twitter.com/Support/status/613308058094039043">June 23, 2015</a>
</blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- Twitter Follow button -->
<a href="https://twitter.com/Support" class="twitter-follow-button" data-show-count="false">Follow @Support</a>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@sirodoht
sirodoht / max-call-stack.js
Created December 27, 2016 12:39
Compute call stack limit
function computeMaxCallStackSize() {
try {
return 1 + computeMaxCallStackSize();
} catch (e) {
// Call stack overflow
return 1;
}
}
computeMaxCallStackSize();
@sirodoht
sirodoht / bounce-up.css
Created December 19, 2017 17:38
Simple bounce up CSS animation
.bounce-up {
animation: bounce-up 3s infinite;
}
@keyframes bounce-up {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-10px);
@sirodoht
sirodoht / tolltip.css
Last active January 4, 2018 15:42
CSS only simple tooltip from https://codepen.io/cbracco/pen/qzukg
/**
* Demo styles
* Not needed for tooltips to work
*/
/* `border-box`... ALL THE THINGS! */
html {
box-sizing: border-box;
}
@sirodoht
sirodoht / longest_collatz_sequence.rs
Created January 31, 2018 09:30
Longest Collatz sequence solution, Project Euler #14
// Longest Collatz sequence
// https://projecteuler.net/problem=14
fn collatz(num: u32) -> u32 {
if num == 1 {
return num;
}
if num % 2 == 0 {
num / 2
$ gpg --list-secret-keys
$ gpg --edit-key XXX
gpg> expire
gpg> key 1
gpg> expire
gpg> save
$ gpg --list-secret-keys