This file contains hidden or 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
| # -*- mode: snippet -*- | |
| # name: html5 document | |
| # key: html5 | |
| # binding: "keybinding" | |
| # expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't)) | |
| # -- | |
| <!DOCTYPE html> | |
| <html lang="en-US"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
This file contains hidden or 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
| /* | |
| * def.js: Простое наследование в стиле Ruby для Javascript | |
| * | |
| * Copyright (c) 2010 Tobias Schneider | |
| * This script is freely distributable under the terms of the MIT license. | |
| */ | |
| (function(global) { | |
| // Используется, чтобы сохранить суперкласс и "плагины" ля | |
| // дальнейшего использования |
This file contains hidden or 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
| #!/usr/bin/env zsh | |
| if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]] | |
| then | |
| source "${TM_PROJECT_DIRECTORY}/.rvmrc" | |
| fi | |
| `which ruby` $* |
This file contains hidden or 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
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css" /> | |
| <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg'></script> | |
| <script src="http://openlayers.org/api/OpenLayers.js"></script> | |
| <script src="http://www.google.com/jsapi?key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg"></script> | |
| <script type="text/javascript"> | |
| google.load("jquery", '1.4'); | |
| google.load("maps", "2.x"); | |
| </script> |
This file contains hidden or 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
| # spec/support/factory_helper.rb | |
| module FactoryHelper | |
| def self.included(base) | |
| base.send(:include, FactoryHelper::InstanceMethods) | |
| end | |
| module InstanceMethods | |
| # Extracts a klass name and the attribute name out of a string | |
| # like this: find_or_create_factory_KLASS_NAME_by_ATTRIBUTE |
This file contains hidden or 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
| # WARNING: Unrefactored Proof of Concept | |
| # | |
| # Allows: | |
| # [1,1,1].should all_be eq(1) | |
| # [2,4,6].should all_be_even | |
| # [2,3,5].should all_be { |n| prime?(n) } # for appropriate definition of prime?# | |
| # | |
| # Not Yet Implemented: | |
| # [1,1,1].should all_be == 1 | |
| # [3,6,9].should all_be_divisible_by(3) |
This file contains hidden or 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
| module Archives | |
| module Callbacks | |
| def self.included(base) | |
| base.send :include, Archives::Callbacks::InstanceMethods | |
| base.before_create :do_something_awesome | |
| end | |
| module InstanceMethods | |
| private |
This file contains hidden or 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
| RSpec::Matchers.define(:be_same_file_as) do |exected_file_path| | |
| match do |actual_file_path| | |
| md5_hash(actual_file_path).should == md5_hash(exected_file_path) | |
| end | |
| def md5_hash(file_path) | |
| Digest::MD5.hexdigest(File.read(file_path)) | |
| end | |
| end |
This file contains hidden or 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
| (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.Rmd\\'" . markdown-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.rmd\\'" . markdown-mode)) | |
| (add-hook 'markdown-mode-hook 'turn-on-outline-minor-mode) | |
| (defun rmarkdown-new-chunk (name) | |
| "Insert a new R chunk." | |
| (interactive "sChunk name: ") | |
| (insert "\n```{r " name "}\n") | |
| (save-excursion |
This file contains hidden or 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
| # Put this into lib/tasks | |
| require 'rubygems' | |
| require 'bundler' | |
| require 'aws-sdk' | |
| require 'socket' | |
| require 'os' | |
| if Rails.env.development? |
OlderNewer