Skip to content

Instantly share code, notes, and snippets.

View slgraff's full-sized avatar

Steve Graff slgraff

  • GitHub
  • Durham, NC
  • 19:39 (UTC -12:00)
View GitHub Profile
var randomNumbers = [42, 12, 88, 62, 63, 56, 1, 77, 88, 97, 97, 20, 45, 91, 62, 2, 15, 31, 59, 5]
func partition(v: Int[], left: Int, right: Int) -> Int {
var i = left
for j in (left + 1)..(right + 1) {
if v[j] < v[left] {
i += 1
(v[i], v[j]) = (v[j], v[i])
}
}

This is a test of using HTML lists, with different numbering/lettering types, in a GitHub markdown document.

This HTML list code:

<ol type="a">
    <li><strong>Text</strong></li>
    <li><strong>Written</strong></li>
        <ol type="1">
            <li>Hello</li>
 Testing bug
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
    iframe->>dotcom: iframe ready
 dotcom-&gt;&gt;iframe: set mermaid data on iframe
  graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
@slgraff
slgraff / helloworld.c
Last active March 22, 2022 13:38
test of tab size preference in public gist
/* Test of whether the new tab size preference applies to code files in a gist */
#include <stdio.h>
int main() {
// printf() displays the string inside quotation
printf("Hello, World!");
return 0;
}
@slgraff
slgraff / gist-revisions.test.txt
Last active September 16, 2021 17:46
Sample gist with multiple revisions
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut iaculis eros sit amet rutrum blandit. Integer vehicula elementum enim nec dictum. Vivamus facilisis est odio, nec consectetur ipsum consequat id. Quisque euismod sodales lobortis. Aenean et ultricies felis. Maecenas ac justo sodales, tincidunt nulla non, vestibulum lacus. Quisque ullamcorper laoreet diam at malesuada. In hac habitasse platea dictumst. Integer sodales diam a gravida efficitur. Pellentesque luctus dolor orci, sed convallis tortor eleifend et. Duis ornare leo ligula, in imperdiet urna ullamcorper id. Duis eget ante nec lorem commodo blandit vitae ac dui. Quisque varius nulla urna, id tristique justo convallis a. Duis sit amet commodo ligula, sed porttitor enim. Aliquam eget diam maximus, molestie eros sed, consectetur eros. Maecenas laoreet lobortis neque quis dignissim.
Lucas ipsum dolor sit amet yoda darth hutt jinn darth hutt palpatine moff coruscant jawa. K-3po ahsoka kenobi hutt hutt. Solo jade alderaan windu dantooine gamorrean.
@slgraff
slgraff / exit_gnome_archlinux.md
Last active May 19, 2021 17:59
How to exit the GNOME desktop on Arch Linux in VMware Fusion on macOS

Press Control-Option(Alt)-F4

On a MacBook Pro with Touch Bar, you can either press the Fn key to display the function keys, or you can enable the function keys on a per-application basis.

https://support.apple.com/en-us/HT207240

@slgraff
slgraff / details_tag.md
Last active May 10, 2021 14:44
HTML DETAILS tag in Markdown
More interesting facts about me
  • I'm good enough!
  • I'm smart enough!
  • Gosh darnit, people like me!
More interesting facts about me
@slgraff
slgraff / CoffeeCupEditor.txt
Created March 19, 2020 19:40
Setting CoffeeCup as external editor on Windows
Using CoffeCup as your external editor for Git
You can set your default editor in Git to use CoffeeCup if you have installed the editor.
- Instlall CoffeeCup
- Open GitBash
- Type this command:
`$ git config --global core.editor "'c:/Users//AppData/Roaming/CoffeeCup Software/CoffeeCup Free HTML Editor/Coffee.exe' -w"
"'c:/Users/slgra/AppData/Roaming/CoffeeCup Software/CoffeeCup Free HTML Editor/Coffee.exe' -w"
@slgraff
slgraff / GraphQLGetStars.txt
Created February 25, 2020 20:49
Use GraphQL to get number of stars for a repository
query {
repository(owner: YOUR_USERNAME, name: YOUR_REPO_NAME) {
stargazers {
totalCount
}
}
}