This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; MELPA | |
(require 'package) ;; You might already have this line | |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) | |
(when (< emacs-major-version 24) | |
;; For important compatibility libraries like cl-lib | |
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) | |
(package-initialize) ;; You might already have this line | |
;; Hide menu and tool bar | |
(menu-bar-mode -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mash | |
def initialize | |
@mash = {} | |
end | |
def method_missing(method_id, *args) | |
string_method = method_id.to_s | |
if is_predicate?(method_id) | |
key = string_method[0...-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/\A(http|https):\/\/(([a-z0-9]+\:)?[a-z0-9]+\@)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?\z/ix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rename all *.txt to *.text | |
for f in *.txt; do | |
mv -- "$f" "${f%.txt}.text" | |
done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"cmd": ["/home/zvlex/.rvm/bin/rvm-auto-ruby", "$file"], | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": "source.ruby" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"default_encoding": "UTF-8", | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"theme": "Soda Dark.sublime-theme", | |
"soda_folder_icons": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
/[if lt IE 7] | |
| <html class="ie6"> | |
/[if IE 7] | |
| <html class="ie7"> | |
/[if IE 8] | |
| <html class="ie8"> | |
/[if IE 9] | |
| <html class="ie9"> | |
| <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This snippet shows how TokenAuthenticatable works in Devise today. | |
# In case you want to maintain backwards compatibility, you can ditch | |
# devise's token mechanism in favor of this hand-rolled one. If not, | |
# it is recommended to migrate to the mechanism defined in the following | |
# snippet (2_safe_token_authenticatable.rb). | |
# | |
# In both snippets, we are assuming the User is the Devise model. | |
class User < ActiveRecord::Base | |
# You likely have this before callback set up for the token. | |
before_save :ensure_authentication_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :post do | |
desc 'create a new jekyll post' | |
task :new do | |
title = ENV['title'] | |
time = Time.now | |
slug = "#{time.strftime("%Y-%m-%d")}#{title.downcase.gsub(/[^\w]+/, '-')}" | |
file = File.join( | |
File.dirname(__FILE__), | |
'_posts', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.autoload_paths += %W(#{config.root}/app/models/ckeditor) | |
config.assets.precompile += Ckeditor.assets | |
config.assets.precompile += %w(ckeditor/*) |