Skip to content

Instantly share code, notes, and snippets.

View joshgoebel's full-sized avatar
💭
Playing with GitHub status.

Josh Goebel joshgoebel

💭
Playing with GitHub status.
  • CoverMyMeds
  • Louisville, KY
View GitHub Profile
def split(str, delimiters)
delimiters = delimiters.split(//)
result, acc = [], ""
str.split(//).each do |c|
if delimiters.include?(c)
# add the acculumator and the delimiter to our growing output array
unless acc.empty?
result << acc
acc = "" # reset accumulator
void loop() {
ABWindow *window;
bool focused;
// pause render until it's time for the next frame
if (!(arduboy.nextFrame()))
return;
arduboy.clear();
#define PROMPT(buffer, direction, index, result) \
do { \
char *after; \
char before[MAX_LINE_LEN]; \
fprintf(stderr, "(search %c%d) `%s':", direction[0], index, buffer); \
if (index > 0) {\
int i = 0; \
after = strstr(result,buffer); \
int len = strlen(result) - strlen(after); \
strcpy(before, result); \
@joshgoebel
joshgoebel / # rust - 2017-11-01_11-59-19.txt
Created November 1, 2017 16:27
rust on macOS 10.13.1 - Homebrew build logs
Homebrew build logs for rust on macOS 10.13.1
Build date: 2017-11-01 11:59:19
### Keybase proof
I hereby claim:
* I am yyyc514 on github.
* I am yyyc514 (https://keybase.io/yyyc514) on keybase.
* I have a public key ASCLrWqr7nJF5ud8-nPRzMc19-VgSlvOtj-Vg3-3gLxPzgo
To claim this, I am signing this object:
// should really use various NOPs here instead of while loop
#define SPOUT(x) SPDR = x; \
while (!(SPSR & _BV(SPIF))) { }
// should really use various NOPs here instead of while loop
#define SPOUT2(x) SPDR = x; \
while (!(SPSR & _BV(SPIF))) { }
// should really use various NOPs here instead of while loop
#define SPOUT3(x) SPDR = x; \
template render*(body: string) :untyped =
if (resp.code == 0):
resp.code = 200
resp.body = body
### How do I write this without changing resp.body? body in the template is wrongly taking it's place also.
location @missing {
# how can i always log this?
return 404;
}
location ~* \.(jpg|jpeg|gif|css|js)$ {
access_log off;
expires 30d;
rewrite_log on;
==> /var/log/nginx/access.log <==
96.28.189.235 - - [25/Apr/2020:23:36:50 +0000] "GET /pastes.atom HTTP/1.1" 410 136 "-" "curl/7.54.0"
79.209.49.117 - - [25/Apr/2020:23:36:51 +0000] "GET /pastes.atom HTTP/1.1" 301 162 "-" "Mozilla/5.0 (X11;
body {
background:black;
color: #ccc;
padding:0px 40px;
font-family: "Operator Mono";
font-weight: 200;
}
h1,h2,h3,p {
font-size:1em;