Skip to content

Instantly share code, notes, and snippets.

View samrobbins85's full-sized avatar
👨‍💻
Making things

Sam Robbins samrobbins85

👨‍💻
Making things
View GitHub Profile
@samrobbins85
samrobbins85 / axios.js
Created July 31, 2020 16:20
Timing for axios requests
const axiosTiming = (instance) => {
instance.interceptors.request.use((request) => {
request.ts = Date.now();
return request;
});
instance.interceptors.response.use((response) => {
const timeInMs = `${Number(Date.now() - response.config.ts).toFixed()}ms`;
response.latency = timeInMs;
return response;
@samrobbins85
samrobbins85 / underscore.sh
Created May 6, 2020 09:36
Replace all spaces with underscores in images
find . -type f -name "* *.png" -exec bash -c 'mv "$0" "${0// /_}"' {} \;
@samrobbins85
samrobbins85 / word_count.sh
Created April 11, 2020 16:01
Word count, not including last page (for references)
pdftotext -l $(pdfinfo "File.pdf" | grep Pages | awk '{print $2-1}') "File.pdf" -| wc -w
@samrobbins85
samrobbins85 / table_padding.tex
Created April 11, 2020 15:43
Increase spacing in LaTeX Tables
{\renewcommand{\arraystretch}{3}
% Put the table here
}

Keybase proof

I hereby claim:

  • I am samrobbins85 on github.
  • I am samrobbins (https://keybase.io/samrobbins) on keybase.
  • I have a public key ASD-4_wi7aXAgdQM7j5ep-9MGytQx_Po9TWG7-x2ODJjsQo

To claim this, I am signing this object: