Skip to content

Instantly share code, notes, and snippets.

@knubie
knubie / vim-fold.patch
Last active July 31, 2016 02:46
Patch file for removing fold bug in vim
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d83dc40..605b033 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -798,16 +798,6 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
linenr_T extra; /* Num lines added before line1 */
linenr_T num_lines; /* Num lines moved */
linenr_T last_line; /* Last line in file after adding new text */
-#ifdef FEAT_FOLDING
- int isFolded;
set -gx PATH $HOME/.bin $HOME/Library/Haskell/bin /usr/local/bin $HOME/.rbenv/bin $HOME/.rbenv/shims /usr/local/share/npm/bin /usr/local/heroku/bin /usr/local/opt/fzf/bin $PATH
# /usr/local/opt/coreutils/libexec/gnubin
set -gx EDITOR vim
set -gx FIGLET_FONTDIR $HOME/.figlet
# Pretty ls colors
set -x LSCOLORS Axhxaxaxaxaxaxaxaxaxax
# Variables used in the prompt
@knubie
knubie / urbit-cheatsheet.md
Last active October 6, 2023 03:09
An Urbit cheat sheet

This cheat sheet contains lists of 'Hoon' words and symbols and short descriptions of what they are or what they do. Note that we unabashedly map Hoon concepts to the closest corresponding concept in other programming languages, even if the concepts are not quite the same. For example, in biology, [http://evolution.berkeley.edu/evosite/evo101/IIC1Homologies.shtml bird wings and bat wings are said to be analogous but not homologous], because they have similar function but they are not quite the same and indeed the common ancestor of birds and bats did not have wings. In this table, we map analogous concepts to each other even if they are not homologous; if bat wings and bird wings were here, we would map bat wings to bird wings. For example, we map 'gate' to 'function; see the section "Gates and lambda" from [http://doc.urbit.org/doc/hoon/tut/4/ Hoon tutorial section 4] for more discussion of this.

Please note that i am writing this in the process of learning Hoon, and i don't understand most of what is writt

> +examples/euler7 10.001
/~wanneb-siddep-halsed-lisbyn/home/~2016.6.12..13.39.21..2fa8/arvo/ford
<[1.210 24].[1.210 52]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[7 1].[34 3]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[7 11].[34 3]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[8 1].[34 3]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[9 1].[34 3]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[13 1].[34 3]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[26 3].[33 52]>
/~wanneb-siddep-halsed-lisbyn/sandbox/0/gen/examples/euler7:<[27 3].[33 52]>
commit d380436f3d34c19e7290364e29a92d785a9da842
Author: Matt Steedman <steedman87@gmail.com>
Date: Sat Oct 10 15:33:45 2015 -0400
Apply indexcolor patch
diff --git a/color.c b/color.c
index 64a46dc..7c6a220 100644
--- a/color.c
+++ b/color.c
commit d380436f3d34c19e7290364e29a92d785a9da842
Author: Matt Steedman <steedman87@gmail.com>
Date: Sat Oct 10 15:33:45 2015 -0400
Apply indexcolor patch
diff --git a/color.c b/color.c
index 64a46dc..7c6a220 100644
--- a/color.c
+++ b/color.c

Docker

What is Docker?

Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.

More info here: https://www.docker.com/whatisdocker

Sass namespacing

Every section should be wrapped in a section container with a unique id. All styles will be nested within that section so as to avoid creating global styles.

  <section id="my-section">
    <div class="header">
      This is a header
    </div>
    <div class="body">
      This is the body for this section
 

#Browserify

###Prevents polluting the global namespace Everything declared inside a module is local to the module, by default. If you want something declared in a module to be public, so that other modules can use it, you must export that feature. This is done by assigning it to module.exports. In a separate file, we can import and use exported features by using require() function:

  //myclass.js==============
  var MyClass = function() { ... };
  
  module.exports = MyClass;
$ ->
class Palettes
constructor: (@$el, @numbers) ->
@$selector = @$el.find('.selector')
@$selector.on 'mouseenter', (e) =>
if $.browser.msie and parseInt($.browser.version) < 10
$('.look-viewer .look img').css 'opacity', 0
@$el.find '.look'
.eq @$selector.index(e.currentTarget)
.find 'img'