Skip to content

Instantly share code, notes, and snippets.

Theodore Keloglou sirodoht

Block or report user

Report or block sirodoht

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sirodoht
sirodoht / crawl_404.sh
Created Mar 12, 2016
Crawl your site for 404's
View crawl_404.sh
$ 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 Mar 12, 2016
Crawl your site for anything but HTTP 200's
View crawl_no200.sh
$ 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]
View keybase.md

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:

View all-the-right-moves.txt
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 Dec 21, 2016
Web embed examples
View embed-examples.html
<!-- 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 Dec 27, 2016
Compute call stack limit
View max-call-stack.js
function computeMaxCallStackSize() {
try {
return 1 + computeMaxCallStackSize();
} catch (e) {
// Call stack overflow
return 1;
}
}
computeMaxCallStackSize();
@sirodoht
sirodoht / django-csrf.js
Created Nov 7, 2017
Get CSRF token from Django HTML templates with vanilla JS
View django-csrf.js
function getCsrf() {
var inputElems = document.querySelectorAll('input');
var csrfToken = '';
for (i = 0; i < inputElems.length; ++i) {
if (inputElems[i].name === 'csrfmiddlewaretoken') {
csrfToken = inputElems[i].value;
break;
}
}
return csrfToken;
@sirodoht
sirodoht / bounce-up.css
Created Dec 19, 2017
Simple bounce up CSS animation
View bounce-up.css
.bounce-up {
animation: bounce-up 3s infinite;
}
@keyframes bounce-up {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-10px);
View tolltip.css
/**
* 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 Jan 31, 2018
Longest Collatz sequence solution, Project Euler #14
View longest_collatz_sequence.rs
// Longest Collatz sequence
// https://projecteuler.net/problem=14
fn collatz(num: u32) -> u32 {
if num == 1 {
return num;
}
if num % 2 == 0 {
num / 2
You can’t perform that action at this time.