Skip to content

Instantly share code, notes, and snippets.

@m1stermanager
m1stermanager / change file or directory owner
Last active March 3, 2020 16:17
random devops-ish stuff
1. see who the owner is w/ `ls -al`
2. use `chown <target-user-name>:<target-user-name> <target directory or file>` ie. `chown user:user dir/file`
-- use -R if needed (recursive)
@m1stermanager
m1stermanager / file size alarms going off
Created March 3, 2020 14:46
random devops-ish stuff
source: https://maryrosecook.com/blog/post/freeing-disk-space-on-your-linux-server
1. ssh into box
2. sudo
3. get to root, run `du -h --max-depth=1`
4. follow the trail of the largest directories, removing what you don't need
http://www.codersatwork.com/
https://twobithistory.org/
@m1stermanager
m1stermanager / strava-dump.sh
Last active May 12, 2017 02:22
Learning bash to obstinately access strava's API
#! /bin/bash
# heres the plan:
# - call strava w/ the max page size until we have all of our activities
# - as we come across a new id (not in the ".processed" file) we pull down its laps from strava
# - once we have the laps append them to the "data" file
# - append the completed id to the ".processed" file
touch data/strava/data
touch data/strava/.processed