Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven G. Harms sgharms

View GitHub Profile
@sgharms
sgharms / gitbook_to_md.js
Created Jul 25, 2018
Convert Gitbook export JSON blob to Markdown
View gitbook_to_md.js
#!/usr/bin/env node
const fs = require('fs');
const processFile = process.argv[2];
const theStack = [];
let nestDepth = -1;
const applyMarks = textNode => {
@sgharms
sgharms / 00_intro.md
Last active Jun 3, 2021 — forked from anonymous/intro.md
Learning to work with command-line Swift on Linux
View 00_intro.md

The goal was to learn how to make a simple HTTP request in Swift using Swift 3 on Linux.

Obviously, this presents some logistical challenges but also is enlightening about the state of Swift as a language for general computing outside of the Apple tooling ecosystem. I got stumped and worked using only vim and the available documentation.

@sgharms
sgharms / netrw.txt
Created Jan 15, 2021 — forked from danidiaz/netrw.txt
Vim's netrw commands.
View netrw.txt
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@sgharms
sgharms / vocabulary-jsonld.json
Created Oct 3, 2018 — forked from stain/vocabulary-jsonld.json
Example of how a simple OWL ontology / RDFS vocabulary could be defined with JSON-LD, defining the meaning of properties and classes. The second file shows the RDF triples of the vocabulary by using the JSON-LD sandbox. As a visualization - see http://www.essepuntato.it/lode/owlapi/https://gist.github.com/stain/7690362/raw/114f836a64291a3f894c44…
View vocabulary-jsonld.json
{ "@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"express": "http://example.com/express#",
"defines": {
"@reverse": "rdfs:isDefinedBy"
},
"propertyOf": {
"@id": "rdfs:domain",
View DigitalOcean_NoVNC_Paste.js
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
View keybase.md

Keybase proof

I hereby claim:

  • I am sgharms on github.
  • I am sgharms (https://keybase.io/sgharms) on keybase.
  • I have a public key whose fingerprint is 3260 51D8 5BE7 BBD3 4663 932F 337A F45B E605 2DAF

To claim this, I am signing this object:

View kickstarter_sql_style_guide.md
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

View overview_demo.rb
class Sandwich
end
class GrilledCheeseMaker
def initialize(bottom_substrate, top_substrate, cheese_type, cook_type)
@bottom_substrate = bottom_substrate
@top_substrate = top_substrate
@cheese_type = cheese_type
@cook_type = cook_type
View interview-questions.md

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

View http.rb
# My Thoughts on Greppability
#
# The code certainly *seems* greppable but let me stress the greppability a bit.... ;)
#
# ➜ 7390184 git:(master) ✗ ack put http.rb
# :put,
#
# Comment #1
# ==========
#