Skip to content

Instantly share code, notes, and snippets.

View rawsh's full-sized avatar

Robert Washbourne rawsh

View GitHub Profile
@rawsh
rawsh / matrixcheck.py
Created September 26, 2016 01:42
USAMTS Prob. 1 Robert Washbourne Matrix Checker Code
import numpy as np
def checkHorizontal(mat):
for row in mat:
row = list(row)
if row.count(1) == 3 and row.count(2) == 3 and row.count(3) == 3:
pass
else:
return False
return True
@rawsh
rawsh / readme.md
Last active October 24, 2016 21:49
Ghost subscribe page used with a mailgrunt server

Make sure to change the url in the fetch part of the js code. This is used with the https://github.com/rawsh/devpygrunt code to hack email subscribtions into ghost. Note: This does not use ghost built in subscribers. This uses mailgun. To make it send emails for every new post, sign up for zapier and add a mailgun rss sender.

@rawsh
rawsh / yabar.conf
Created November 21, 2016 22:54
yabar config file for my i3 desktop
bar-list = ["topbar", "otherbar"];
topbar: {
// List of all blocks
block-list: ["workspaces", "space", "title", "cpu", "memory", "network", "date"];
// Font (considering using an Icon Font - like Material Icons)
// Only on first monitor
font: "DejaVu Sans Mono 8"
monitor: "HDMI-1";
{{#has tag="list"}}
<article class="post" style="margin: 0 auto;"><b>TIP: You can navigate this article with your arrow keys! Use the left and right buttons to scroll to sections. (Only on computer.)</b></article>
{{/has}}
@rawsh
rawsh / in body
Created November 28, 2016 04:17
ghost input js and css
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fluidbox/2.0.4/css/fluidbox.min.css" />
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/fluidbox/2.0.4/js/jquery.fluidbox.min.js'></script>
<script>
$('#post-header-image > img, #article-content img').each(function() {
$(this).wrap("<a href='" + this.src + "'/>");
});
$('#post-header-image > a, #article-content a').fluidbox({
viewportFill: 1,
});
</script>
@rawsh
rawsh / yabar.conf
Created November 28, 2016 23:54
My yabar config (.config/yabar/yabar.conf)
bar-list = ["topbar"];
topbar: {
// List of all blocks
block-list: ["workspaces", "space", "title", "cpu", "memory", "network", "date"];
font: "Droid Sans Mono 8"
// set monitor if you wish:
// monitor: "HDMI-1";
@rawsh
rawsh / firefoxstyles.css
Created December 26, 2016 17:54
My firefox styles to go with FXopera
#historydropmarker, #autocomplete-history-dropmarker, #urlbar-history-dropmarker, #dropmarker, .autocomplete-history-dropmarker {
display: none !important;
}
/* #urlbar > #identity-box > #identity-icon {
display: none;
} */
.urlbar-input-box, #urlbar-reload-button, #PanelUI-button, #urlbar-go-button, #urlbar-stop-button {
border: none;
int ones = t % 10;
int twos = (t-t%10)/10;
String[] singledigits = new String[] {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
String[] doubledigits = new String[] {"", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", "eighty", "ninety"};
String[] teens = new String[] {"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
if (twos == 0) {
inwords = singledigits[ones];
} else if (twos == 1) {
@rawsh
rawsh / albums.py
Created January 12, 2017 20:10
Dads code
#!/usr/bin/env python2
from oauth2client.client import OAuth2WebServerFlow
import gdata.photos.service
import os
print "Content-type: text/html"
print
print "<title>Google Photos Browser</title>"