Skip to content

Instantly share code, notes, and snippets.

View michaldarda's full-sized avatar

Michał Darda michaldarda

View GitHub Profile
@michaldarda
michaldarda / powrc
Created September 5, 2013 20:53 — forked from madwork/powrc
export SSL_CERT_FILE=/usr/local/share/ca-bundle.crt
source /usr/local/share/chruby/chruby.sh
chruby $(cat .ruby-version)
#!/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
public class MLRoundedImageView extends ImageView {
public MLRoundedImageView(Context context) {
super(context);
}
public MLRoundedImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}

Mopidy on Arch Linux

mopidy

Installation

Install from the AUR.

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

@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 July 22, 2016 12:28 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@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
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/png"
"math"