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"
@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)

namespace :db do
require "sequel"
Sequel.extension :migration
DB = Sequel.connect(ENV['DATABASE_URL'])
desc "Prints current schema version"
task :version do
version = if DB.tables.include?(:schema_info)
DB[:schema_info].first[:version]
end || 0

Mopidy on Arch Linux

mopidy

Installation

Install from the AUR.

public class MLRoundedImageView extends ImageView {
public MLRoundedImageView(Context context) {
super(context);
}
public MLRoundedImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
#!/usr/bin/ruby
# Convert a Markdown README to HTML with Github Flavored Markdown
# Github and Pygments styles are included in the output
#
# Requirements: json gem (`gem install json`)
#
# Input: STDIN or filename
# Output: STDOUT
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file
# cat README.md | flavor > README.html