Skip to content

Instantly share code, notes, and snippets.

@holms
holms / dark.md
Created Aug 8, 2018 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
View dark.md
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
     $("<style></style>").appendTo('head').html(css);
@holms
holms / migrate-backend.sh
Created Apr 20, 2018
Splitting folder to separate git repositories
View migrate-backend.sh
# 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 git@bitbucket.org:xxxx/app.git
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
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
ARG PLUGIN_AUTH=https://github.com/gocd-contrib/gocd-oauth-login/releases/download/v2.4/github-oauth-login-2.4.jar
ARG PLUGIN_YAML=https://github.com/tomzo/gocd-yaml-config-plugin/releases/download/0.4.0/yaml-config-plugin-0.4.0.jar
ARG PLUGIN_GITHUB_PR=https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.4/github-pr-poller-1.3.4.jar
ARG PLUGIN_GITHUB_STATUS=https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.2/github-pr-status-1.2.jar
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
holms / gist:cbe571e18a569f82a95aec40b15f7c0b
Created Aug 7, 2017
Dockerfile use requirements.dev.txt if $DEV is set
View gist:cbe571e18a569f82a95aec40b15f7c0b
RUN if [ "$DEV" = "True" ]; then pip install -r requirements.dev.txt; fi
View gist:516b163235951ad74824d7f824347933
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCi9uMCmfxFE/BoOQV2OLEx4QKzDzX4JtvUjmjIRTbC/kCr/qmwMYJHVUXZ6ciCTN3tdzdljmmQfFD9d1Lu/ZDdUDU/FJ+yEbKgsf6Ct1Bw6UcaC4iyYV89S8iQfnSLXzeDJcla19BYawvgZfW9jsxgyzAoyKKyVWGM1uMllJ6aprtaM7zetw6mBEomrtLB6Ez17nC9Ipna+EUcogENxGv5H0G6h4ipfQL2EZeetINk9mg9I1xsMdMAaEg/mSRhT9neFkxovOko/hND2aNx+VtARUZ0aTjou03JKZ2elpASOMIyb38n+J94pzQ7WOc3zY0qdqEHAM+e6YPb1MOKaYZp holms@Romans-MacBook-Pro.local