Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
@jedfoster
jedfoster / Markdown test.md
Last active November 12, 2020 02:28
Markdown test <b>BOLD</b>

H1: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H2: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H3: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H4: Roughdraft is GitHub Gists, made pretty. #646464

H5: Roughdraft is GitHub Gists, made pretty. #4d4d4d
H6: Roughdraft is GitHub Gists, made pretty. #212121

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red Violets are blue

@calebhearth
calebhearth / gist:4625280
Created January 24, 2013 17:15
Switch back and forth between directories and git branches, and even merge the last branch you were on, with hyphen!
~/
↪ cd code/project
project[master]/
↪ cd -
~/
↪ cd code/project
project[master]/
@jedfoster
jedfoster / Interview Questions.md
Last active October 23, 2021 02:59
Interview Questions
  1. What brings you to web development? What's your goal? What's your passion? What wakes you up in the middle of the night?

  2. Tell me about common themes you run into working in the UI. How did you address them?

    • UX/Design changes?
    • What’s difficult, what’s fun?
    • Localization
  3. What do you do to keep up to date with technology (blogs, conferences, etc)?

    • What blogs do you follow?
    • If you could master one technology this year, what would it be?

Cursor movement

  • h - move left
  • j - move down
  • k - move up
  • l - move right
  • w - jump by start of words (punctuation considered words) W - jump by words (spaces separate words)
  • e - jump to end of words (punctuation considered words)
  • E - jump to end of words (no punctuation)
  • b - jump backward by words (punctuation considered words) B - jump backward by words (no punctuation)
@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@mattratleph
mattratleph / vimdiff.md
Last active April 24, 2024 11:28 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

#!/usr/bin/ruby
require 'time'
def format_time(seconds)
hours = (seconds / 3600).to_i
minutes = ((seconds % 3600) / 60).to_i
seconds = (seconds % 60).to_i
minutes = "0#{minutes}" if minutes < 10
seconds = "0#{seconds}" if seconds < 10
@visnup
visnup / lock.css
Created May 5, 2012 20:31
"lock" orientation of a website for mobile (iPad, iPhone)
/* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */
@media (orientation: portrait) {
body {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}