Skip to content

Instantly share code, notes, and snippets.

View tommyskott's full-sized avatar
👨‍💻
Swedish Freelancer

Tommy Borgenfalk Skott tommyskott

👨‍💻
Swedish Freelancer
View GitHub Profile

Homebrew

When brew cleanup fails with permission errors, try:

sudo chown -R "$(whoami)":admin /usr/local/lib

Wp Api

Cleaner payload:

/wp-json/wp/v2/posts?_fields[]=title&_fields[]=content
@tommyskott
tommyskott / tar.sh
Created April 29, 2021 22:05
Create a tar file from all of the folder contents.
tar -czhf ${CI_COMMIT_TAG}.tar.gz -X .tarignore *
@tommyskott
tommyskott / .tarignore
Created April 29, 2021 22:16
Ignore file for when creating new tar files.
.git
.gitignore
.gitkeep
.babelrc
.editorconfig
.vscode
docker
docker-compose.yml
.env.example
phpcs.xml
@tommyskott
tommyskott / autoloader.php
Last active June 21, 2022 09:37
Require WordPress mu-plugins in vanilla wp projects.
<?php
/*
Plugin Name: B&S Autoloader
Plugin URI: https://github.com/borgenfalkskott
Description: Mu-plugin autoloader for vanilla Wp.
Version: 1.1.0
Author: Borgenfalk & Skott
Author URI: https://borgenfalk.se
License: MIT
*/
@tommyskott
tommyskott / Xcode - shortcuts.md
Last active December 22, 2021 22:51
Xcode - shortcuts and other goodies

Xcode - shortcuts and other goodies

Build

cmd + b

Build and run

cmd + r
@tommyskott
tommyskott / tools.md
Last active September 24, 2025 12:35
A list of links to some of the tools I use.
@tommyskott
tommyskott / ffmpeg_shrink.sh
Last active March 29, 2022 08:10
Scale down all jpgs in a folder to a set size and save them with a suffix
#!/bin/bash
# Requires ffmpeg
# Scale down all jpgs in a folder to a set size and save them with a suffix
for i in *.jpg; do ffmpeg -i "${i}" -vf scale=1200:-1 "${i%.*}_small.jpg"; done
@tommyskott
tommyskott / _insta-curl.sh
Created March 29, 2022 09:54
Curl instagram user's posts to a file on the desktop
#!/bin/bash
curl https://www.instagram.com/instagram/\?__a\=1 > ~/Desktop/insta.json