Skip to content

Instantly share code, notes, and snippets.

View dacamp's full-sized avatar
🙊

David Campbell dacamp

🙊
View GitHub Profile
@joshuat
joshuat / Slack avatar-less sidebar.md
Last active January 19, 2021 08:25
Remove the avatars from your slack sidebar

Slack has listened to feedback and given us a way to toggle off the sidebar avatars.

(This only seems to be available in the Beta channel at the moment)

Display or hide profile photos

  1. From your desktop, click your profile picture in the top right.
  2. Select Preferences from the menu.
  3. Click Sidebar in the left-side column.
  4. Check or uncheck the boxes next to Show profile photos next to DMs.
@robertpainsi
robertpainsi / README.md
Last active March 21, 2024 10:45
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@agius
agius / json_diff.rb
Created May 8, 2012 00:52
Ruby JSON Diff
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
unless ARGV.count > 1
puts "Usage: json_diff.rb json_file_1.json json_file_2.json"
exit
end
def different?(a, b, bi_directional=true)
@jbr
jbr / switch.rb
Created February 12, 2011 11:15
ruby 1.9.2 case-like switch
# In response to:
# http://mlomnicki.com/ruby/tricks-and-quirks/2011/02/10/ruby-tricks2.html
# Ruby 1.9.2 has some neat stuff that lets us make a readable
# alternative case statement that calls each method in turn.
# 1.9.2 features used:
# * hashes are ordered in 1.9.2
# * cool JSON-style hash syntax
# * concise lambda syntax