Skip to content

Instantly share code, notes, and snippets.

View Borgaard's full-sized avatar

Nicole Borgaard Borgaard

  • General Assembly
  • San Francisco, CA
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
@myano
myano / cs.py
Created June 30, 2011 01:25
Quick example of ncurses in Python!
#!/usr/bin/env python
import curses
import curses.textpad
import time
stdscr = curses.initscr()
#curses.noecho()
#curses.echo()
@zenorocha
zenorocha / README.md
Last active May 28, 2024 08:23
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@gitaarik
gitaarik / git_submodules.md
Last active July 23, 2024 12:21
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@jac1013
jac1013 / donut_chart.js
Last active November 13, 2020 23:23
A d3.js single value donut chart. JSFiddle: http://jsfiddle.net/8moez4j3/
var donutChart;
(function() {
var width = 500,
height = 300,
radius = 100,
innerRadius = 80,
transitionsDuration = 1000,
transitionsDelay = 250,
percentageTextSize = '2.0rem',
transitionType = 'elastic';
@mikelove
mikelove / redcarpetkramdown.md
Last active July 5, 2018 06:46
redcarpet vs kramdown play nice with mathjax

Issues with latex math in markdown files, for display on Github Pages (using jekyll)

Our solution: use kramdown parser, with GFM option (Github flavored Markdown). In the .Rmd, use $$ for display math and $ for inline math. then have a script which turns the inline math demarkation in the .md file from $ into $$ when appropriate (avoiding data frame usage), before uploading the .md to Github. This way, RStudio preview looks the same as the Github Pages version.

redcarpet math

  • doesn't respect $ or $$ (will parse characters within these, such as _), but has workarounds:
  • has a useful option, no_intra_emphasis, so underscores between ascii characters are not converted to <em> tags, so $x_1$ is fine
  • need to escape underscores after non-ascii characters, for example $\mathbf{x}\_1$
  • need to double escape curly bracket: \\{