Instantly share code, notes, and snippets.

🌴
Hiking the Pacific Crest Trail

# Kyle Barronkylebarron

🌴
Hiking the Pacific Crest Trail
• Sort options
Last active Jul 14, 2019
Guide to writing an Atom language grammar
View making_language_grammar.md

# A guide to writing a language grammar (TextMate) in Atom

## Tree sitter

• Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help:

Last active Jul 18, 2019
Setting up Atom for LaTeX
View latex_in_atom.md

Disclaimer: I wrote the packages language-latex2e, autocomplete-latex, latex-wordcount, and hyperclick-latex. I still try to provide a list of all useful packages though, so let me know if I have missed one.

This is a general guide for how to get started with LaTeX in Atom.

NOTE: This guide assumes you already have LaTeX installed on your computer. If you do not, I recommend TeX Live.

Last active Jul 17, 2019
Example program to convert Apache Parquet data to Apache Arrow
View ParquetToArrow.java
 /* This code snippet is a part of the blog at https://github.com/animeshtrivedi/blog/blob/master/post/2017-12-26-arrow.md */ import com.google.common.collect.ImmutableList; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.*; import org.apache.arrow.vector.dictionary.DictionaryProvider; import org.apache.arrow.vector.types.FloatingPointPrecision; import org.apache.arrow.vector.types.pojo.ArrowType;
Last active Feb 27, 2018
Apache Arrow in Jupyter with xeus-cling
View Arrow in xeus-cling.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active Jun 19, 2019
Grammar boilerplate with annotations.
View language-sampleGrammar.cson
 # TextMate tutorial: http://manual.macromates.com/en/language_grammars # Regex to convert keys to unquoted: '(include|match|captures|begin|end|beginCaptures|endCaptures|name|patterns|0|1|2|3|4|5|6|7|8|9|comment|fileTypes|scopeName|repository|contentName|firstLineMatch|foldingStartMarker|foldingStopMarker)': scopeName: 'source.' # should be a short, unique indicator for the language ("js", "php", "c", etc.) name: '' # The title that will show up in grammar selection and on your status bar. fileTypes: [ # An array of file extensions. 'txt' 'exif' ]
Last active Jul 23, 2019
A template to make good README.md

# Project Title

One Paragraph of project description goes here

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

Last active Sep 26, 2017
make hydrogen work with remote kernel
View EXECUTABLE_MAGIC
 #!/usr/bin/env bash local_json=$1 remote_ip=$2 remote_json=$3 remote_json_on_local=$(jupyter --runtime-dir)/remote.json scp $remote_ip:$remote_json $remote_json_on_local for socket_name in hb_port control_port stdin_port iopub_port shell_port; do local_port=$(sed 's/,/\n/g' $local_json | grep$socket_name | grep -o "[0-9]\+") remote_port=$(grep$socket_name $remote_json_on_local | grep -o "[0-9]\+") Last active Jul 17, 2019 Things to remember when compiling and linking C/C++ programs View compiling_building_c_cpp_notes.md # Things to remember when compiling/linking C/C++ software by Angel Leon. March 17, 2015. ## Include Paths On the compilation phase, you will usually need to specify the different include paths so that the interfaces (.h, .hpp) which define structs, classes, constans, and functions can be found. With gcc and llvm include paths are passed with -I/path/to/includes, you can pass as many -I as you need. In Windows, cl.exe takes include paths with the following syntax: /I"c:\path\to\includes\ you can also pass as many as you need. Last active Jul 23, 2019 View Makefile  # Hello, and welcome to makefile basics. # # You will learn why make is so great, and why, despite its "weird" syntax, # it is actually a highly expressive, efficient, and powerful way to build # programs. # # Once you're done here, go to # http://www.gnu.org/software/make/manual/make.html # to learn SOOOO much more. Created Nov 20, 2014 Makefile for a Stata project View makefile  # If you don't list all dependencies for code (because maybe it varies programmatically) then you can force a remake by doing 'make -B . Note that it will remake all dependencies! #nice-ness. Uncomment a line to enable. Default is +10 #nice_prefix := nice #nice_prefix := nice -n10 ############################# Project-specific Entries #################### # which entries use parallel and need a windows gateway # from$grep -r eval_synth . --include="*.do"
You can’t perform that action at this time.