Skip to content

Instantly share code, notes, and snippets.

View adammck's full-sized avatar

Adam Mckaig adammck

View GitHub Profile
@adammck
adammck / gist:f582b8d8efb5f01913e032d2517ce2b4
Last active July 14, 2017 14:59
elastic actuator parts
625ZZ radial bearings https://www.amazon.com/gp/product/B01LWMT95S/
E-flite Power 10 BLDC motor https://www.amazon.com/gp/product/B000EREGRC/
Afro 30A Mini ESC https://hobbyking.com/en_us/afro-30a-race-spec-mini-esc-w-opto.html
T5 200mm lead screw https://www.aliexpress.com/item/T5-5mm-screw-200mm-length-1mm-picth-2mm-lead-trapezoidal-spindle-screw-with-brass-copper-nut/32691366672.html
LM5UU linear bearings https://www.aliexpress.com/store/product/LM5UU-5mm-x-10mm-x-15mm-5mm-linear-ball-bearing-bush-bushing-for-5mm-rod-round/834897_32676687916.html
5mm/200mm linear motion shaft https://www.aliexpress.com/item/1pcs-SFC5-WCS5mm-L200mm-chrome-plated-linear-rod-round-Linear-Motion-Shaft-for-CNC-XYZ-can/1739084486.html
5.05mm shaft sleeve https://www.aliexpress.com/item/metal-shaft-sleeve-screens-sleeve-stainless-steel-for-4mm-axis-diy-model-assembly-5-axle-sleeve/32674610277.html
5.5mm/15.5mm compression spring https://www.mcmaster.com/#94125k537/=1
alias mdfmt='find . -name \*.md | xargs -n 1 -I "{}" pandoc -t markdown --normalize --wrap=auto --columns=80 {} -o {}'
diff --git a/src/parser.c b/src/parser.c
index afbfed5..0f459f2 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -332,7 +332,7 @@ int parse_line(struct prog_info *pi, char *line)
}
return(True);
}
- strcpy(pi->fi->scratch, &pi->fi->scratch[i]);
+ memmove(pi->fi->scratch, &pi->fi->scratch[i], strlen(&pi->fi->scratch[i])+1);
{
"rows": [
[7, 3, 1, 1, 7],
[1, 1, 2, 2, 1, 1],
[1, 3, 1, 3, 1, 1, 3, 1],
[1, 3, 1, 1, 6, 1, 3, 1],
[1, 3, 1, 5, 2, 1, 3, 1],
[1, 1, 2, 1, 1],
[7, 1, 1, 1, 1, 1, 7],
[3, 3],
#!/usr/bin/env python
import re
import sys
import urllib2
from datetime import datetime
print "# Generated by %s at %s" % (sys.argv[0], datetime.now())
print
package main
import (
"flag"
"fmt"
"io"
"log"
"net/http"
)
# select * from users;
id | name | personality
----+---------+-------------
1 | adam | f
2 | bob | f
3 | charles | t
(3 rows)
# select * from things;
id | name | owner_id
@adammck
adammck / remaining_failures.txt
Created March 18, 2014 01:36
The remaining failures on the test_against_spec branch of my mustache.go fork
--- FAIL: TestCommentsStandalone (0.00 seconds)
mustache_test.go:44: returned "Begin.\n\nEnd.\n",
expected "Begin.\nEnd.\n"
--- FAIL: TestCommentsIndentedStandalone (0.00 seconds)
mustache_test.go:55: returned "Begin.\n \nEnd.\n",
expected "Begin.\nEnd.\n"
--- FAIL: TestCommentsStandaloneLineEndings (0.00 seconds)
mustache_test.go:66: returned "|\r\n\r\n|",
--- FAIL: TestInterpolationAmpersand (0.00 seconds)
mustache_test.go:375: returned "These characters should not be HTML escaped: \n",
expected "These characters should not be HTML escaped: & \" < >\n"
--- FAIL: TestInterpolationAmpersandIntegerInterpolation (0.00 seconds)
mustache_test.go:411: returned "\" miles an hour!\"",
expected "\"85 miles an hour!\""
--- FAIL: TestInterpolationAmpersandDecimalInterpolation (0.00 seconds)
mustache_test.go:447: returned "\" jiggawatts!\"",
--- FAIL: TestCommentsStandalone (0.00 seconds)
mustache_test.go:52: returned "Begin.\n\nEnd.\n",
expected "Begin.\nEnd.\n"
--- FAIL: TestCommentsIndentedStandalone (0.00 seconds)
mustache_test.go:63: returned "Begin.\n \nEnd.\n",
expected "Begin.\nEnd.\n"
--- FAIL: TestCommentsStandaloneLineEndings (0.00 seconds)
mustache_test.go:74: returned "|\r\n\r\n|",