Skip to content

Instantly share code, notes, and snippets.

holms /
Created Aug 8, 2018 — forked from a7madgamal/
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
   url: '',
   success: function(css) {
holms /
Created Apr 20, 2018
Splitting folder to separate git repositories
# So we have this situation: repo `app` which has `serverapp` folder inside which we want to convert to separate repo
rm -rf app
rm -rf app-server
git clone
cp -R app app-server
cd app-server
git filter-branch --prune-empty --subdirectory-filter serverapp master
echo node_modules/ >> .gitignore # For node.js only
git add .gitignore # For node.js only
git commit -m 'Remove node_modules from git history' # For node.js only
View gist:cf04b4b316e722aea7c801daffa3bcc1
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'
git gc
git push origin master --force
View gist:1f4e55f61a32931e55ac5fc1e8bd623b
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:15:83:15:A3:10 Discovering: yes
[CHG] Device 7C:1E:52:0B:0D:97 LegacyPairing: yes
holms / gist:d740b2ae366cd3cd322fb44e100c2d34
Last active Apr 9, 2018
docker-compose run hostname doesn't work
View gist:d740b2ae366cd3cd322fb44e100c2d34

I've been searching for this all over the internet too. All you need is to add name for your container and it will be available for othre containers:

docker-compose run --name mycontainer mycontainer <whatever-command-here>

This was exact reason why depedencies couldn't connect to app container.

View gist:db39c56af133c0deebdc3f7e636416ab
FROM gocd/gocd-server:v17.9.0
RUN mkdir -p /godata/plugins/external
RUN apk update && \
apk add --update curl && \
rm -rf /var/lib/apt/lists/*
WORKDIR /godata/plugins/external
View gist:bf3a992a74195ed7adc599cb3e8618f9
created directory: '/godata/artifacts'
'/go-working-dir/artifacts' -> '/godata/artifacts'
created directory: '/godata/config'
'/go-working-dir/config' -> '/godata/config'
created directory: '/godata/db'
'/go-working-dir/db' -> '/godata/db'
created directory: '/godata/logs'
'/go-working-dir/logs' -> '/godata/logs'
'/go-working-dir/plugins' -> '/godata/plugins'
created directory: '/godata/addons'
holms / gist:cbe571e18a569f82a95aec40b15f7c0b
Created Aug 7, 2017
Dockerfile use if $DEV is set
View gist:cbe571e18a569f82a95aec40b15f7c0b
RUN if [ "$DEV" = "True" ]; then pip install -r; fi
View gist:516b163235951ad74824d7f824347933
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCi9uMCmfxFE/BoOQV2OLEx4QKzDzX4JtvUjmjIRTbC/kCr/qmwMYJHVUXZ6ciCTN3tdzdljmmQfFD9d1Lu/ZDdUDU/FJ+yEbKgsf6Ct1Bw6UcaC4iyYV89S8iQfnSLXzeDJcla19BYawvgZfW9jsxgyzAoyKKyVWGM1uMllJ6aprtaM7zetw6mBEomrtLB6Ez17nC9Ipna+EUcogENxGv5H0G6h4ipfQL2EZeetINk9mg9I1xsMdMAaEg/mSRhT9neFkxovOko/hND2aNx+VtARUZ0aTjou03JKZ2elpASOMIyb38n+J94pzQ7WOc3zY0qdqEHAM+e6YPb1MOKaYZp holms@Romans-MacBook-Pro.local