Skip to content

Instantly share code, notes, and snippets.

@netlify-bot
netlify-bot / .gitignore
Last active October 7, 2020 20:07
STATICGEN.COM DATA ARCHIVE
node_modules
@briandominick
briandominick / asciidoc-static.adoc
Last active March 31, 2025 03:25
Static Site Generators with AsciiDoc Support

There are 28 static site generators that support AsciiDoc sourcing.

@mdawaffe
mdawaffe / diff-changed-lines.sh
Last active March 25, 2025 11:24
Get line numbers of changed lines - git, diff - Full of bashisms
#!/bin/bash
# Call like you would `diff`
# `./diff-changed-lines.sh old new`
# Outputs the lines numbers of the new file
# that are not present in the old file.
# That is, outputs line numbers for new lines and changed lines
# and does not output line numbers deleted or unchanged lines.
@ines
ines / Install
Last active September 21, 2023 17:14
Streamlit + spaCy
pip install streamlit
pip install spacy
python -m spacy download en_core_web_sm
python -m spacy download en_core_web_md
python -m spacy download de_core_news_sm

Various search databases and backends as alternatives to Elasticsearch.

Rust

@treuille
treuille / selecting_rows.py
Created October 30, 2019 22:18
Workaround: Selecting rows from a dataframe.
import streamlit as st
import pandas as pd
# Load some example data.
DATA_URL = \
"http://s3-us-west-2.amazonaws.com/streamlit-demo-data/uber-raw-data-sep14.csv.gz"
data = st.cache(pd.read_csv)(DATA_URL, nrows=1000)
# Select some rows using st.multiselect. This will break down when you have >1000 rows.
st.write('### Full Dataset', data)
@gwenzek
gwenzek / remote_subl.md
Last active July 12, 2024 11:06
Sublime Text for remote development

This steps should help working remotely with Sublime Text. They are meant to be incremental, just setting up SFTP will go a long way.

My workflow

I have all my code on my laptop, edit locally and automatically push the files to my server. I never edit "tracked" files on the server directly. I sometimes modify untracked files on the server using rmate (see below).

@Dids
Dids / Compile_Go_for_Apple_Silicon_M1.md
Last active January 7, 2025 03:19
Compile Go for Apple Silicon (M1)

NOTICE: This guide is no longer relevant, as a lot has changed over time and Go supports Apple Silicon natively just fine now!

Compile Go for Apple Silicon (M1)

Follow these short instructions on how to compile Go for Apple Silicon (M1). From here on out, we may simply refer to it as the "ARM device".

This entire process should only take about 5-10 minutes, but please read through everything carefully, in order to avoid any potential issues along the way.

Note that at the time of writing this, Go was not yet officially available for Apple's ARM.