Skip to content

Instantly share code, notes, and snippets.

View hovsater's full-sized avatar
🤟

Kevin Hovsäter hovsater

🤟
View GitHub Profile
@dedy-purwanto
dedy-purwanto / gist:11312110
Created April 26, 2014 05:00
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
@stevenyap
stevenyap / Paperclip.md
Last active March 8, 2017 09:56
Paperclip Gem for uploading of attachment

Setup

  • Install the gem gem "paperclip", "~> 3.0"
# Create Database
class AddPhotoToDeals < ActiveRecord::Migration
  def self.up
    add_attachment :deals, :photo
  end