Skip to content

Instantly share code, notes, and snippets.

View michaldarda's full-sized avatar

Michał Darda michaldarda

View GitHub Profile
@michaldarda
michaldarda / gist:b682ff24862ca7982231a4f1a7535f38
Created February 27, 2019 14:29 — forked from ku1ik/gist:3930651
You don't need bundle exec, rbenv-bundler and other bundler integration scripts

You don't need bundle exec, rbenv-bundler or other bundler integration scripts

You just need 2 things

Just prepend $PATH with .bundle/bin:

$ cat ~/.bashrc
...
export PATH=".bundle/bin:$PATH"

...

package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/png"
"math"

Keybase proof

I hereby claim:

  • I am michaldarda on github.
  • I am mdarda (https://keybase.io/mdarda) on keybase.
  • I have a public key whose fingerprint is 4C80 06E1 F77D 5542 9744 F69A 5040 CB4D EF42 65B2

To claim this, I am signing this object:

@michaldarda
michaldarda / 30694_set_in_where_condition.rb
Created September 24, 2017 18:35
30694_set_in_where_condition.rb
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
@michaldarda
michaldarda / fix_ssh_permissions.sh
Created September 23, 2016 06:38
Repairs ssh permissions
#!/bin/sh
find ~/.ssh -type f -exec chmod 600 {} \;
chmod 755 ~/.ssh
chmod 644 ~/.ssh/authorized_keys

Keybase proof

I hereby claim:

  • I am michaldarda on github.
  • I am mdarda (https://keybase.io/mdarda) on keybase.
  • I have a public key ASAwAn5puv7CO6hSpOWkaAv8Yo8dAlS42hghj4wo-hvxwAo

To claim this, I am signing this object:

@michaldarda
michaldarda / iterm
Created July 28, 2016 12:25 — forked from chongkim/iterm
script to send commands to iTerm and go back to MacVim
#!/usr/bin/osascript
on run argv
tell application "iTerm"
if (count of terminals) = 0 then
set _terminal to (make new terminal)
else
set _terminal to current terminal
end if
@michaldarda
michaldarda / README.md
Created July 22, 2016 12:28 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@michaldarda
michaldarda / Gemfile
Created June 24, 2016 14:18 — forked from nateberkopec/Gemfile
ActionCable isn't *really* a Rails 5 dependency.
# gem 'rails'
gem "activerecord"
gem "actionpack"
gem "actionview"
gem "actionmailer"
gem "activejob"
gem "activesupport"
gem "railties"
gem "sprockets-rails"
gem 'sqlite3'
@michaldarda
michaldarda / README.md
Created May 3, 2016 12:58 — forked from bastibense/README.md
Fix blurry fonts on some external monitors when using MacBook Pro Retina

How to fix blurry fonts on some external monitors when using MacBook Pro Retina

It seems that graphcis and fonts look rather blurry on some monitors when hooked up to a MacBook Pro (Retina). This might fix the issue for you:

  1. Download patch-edid.rb from http://embdev.net/attachment/168316/patch-edid.rb

  2. Execute in Terminal (without the $):

    $ ruby patch-edid.rb

  3. Copy produced folder (example: DisplayVendorID-22f0) to /System/Library/Displays/Overrides (authorize if needed, if the folder exists, backup it before)