Skip to content

Instantly share code, notes, and snippets.

View jntme's full-sized avatar

Jonathan Meier jntme

View GitHub Profile
@davisford
davisford / markdown-to-pdf.txt
Last active June 20, 2023 06:20
Convert Markdown to PDF
$ brew install markdown htmldoc
$ markdown <file.md> | htmldoc --cont --headfootsize 8.0 --linkcolor blue --linkstyle plain --format pdf14 - > <file.pdf>
@petemcw
petemcw / brew-instructions.sh
Last active March 27, 2024 15:59
Setup dnsmasq on Mac OS X
# Install `dnsmasq` and configure for *.test domains
$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Reload configuration and clear cache
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ dscacheutil -flushcache
@gitaarik
gitaarik / git_submodules.md
Last active April 22, 2024 10:52
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.
@rlopc
rlopc / sigmoidFunction.matlab
Last active April 9, 2021 03:36
Compute sigmoid function, the hypothesis function in Logistic Regression
function g = sigmoidFunction(z)
% Compute sigmoid function
% You need to return the following variables correctly
g = zeros(size(z));
% Instructions: z can be a matrix, vector or scalar
g = 1.0 ./ ( 1.0 + exp(-z)); % For Matlab
% g = 1.0 ./ ( 1.0 + e.^(-z)); % For Octave, it can use 'exp(1)' or 'e'