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
syntax on | |
autoindent | |
number | |
tabstop=2 | |
shiftwidth=2 | |
expandtab | |
noremap <LeftMouse> : " Tap to command line mode | |
inoremap <LeftMouse> <ESC> " Tap to quit insert mode |
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
class RobotsController < ApplicationController | |
def index | |
render_text = File.read "#{::Rails.root}/public/robots.#{::Rails.env}.txt" | |
respond_to do |format| | |
format.text { render :text => render_text, :layout => false } | |
end | |
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
<% content_for :header do -%> | |
<meta property="og:title" content="title" /> | |
<meta property="og:description" content="description" /> | |
<% 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
# -*- coding: utf-8 -*- | |
class String | |
def fuck(output=STDOUT, input=STDIN) | |
identity = lambda do |value| | |
return value | |
end | |
increment = lambda do |value| | |
return value+1 | |
end | |
decrement = lambda do |value| |
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
$ rake db:migrate --trace | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Invoke db:load_config (first_time) | |
** Invoke rails_env (first_time) | |
** Execute rails_env | |
** Execute db:load_config | |
** Execute db:migrate | |
** Invoke db:_dump (first_time) |
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
require 'guard/guard' | |
notification :growl | |
module ::Guard | |
# 起動時に同期を行う Guard のプラグイン | |
class SyncronizeAll < Guard | |
def start | |
hostname="172.0.0.1" | |
username="eccyan" |
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
scope :use_index, lambda { |*indexes| | |
from("#{self.table_name} USE INDEX(#{indexes.join(', ')})") | |
} |
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
id = 1, | |
name = "eccyan" |
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
#define BUTTON_PIN 2 | |
#define SPEAKER_PIN 3 | |
#define CONTROLLER_PIN 9 | |
#define FREQUENCY 440 | |
#define DURATION 300 | |
#define COMMAND_LENGTH_MAX 10 | |
char current_command[COMMAND_LENGTH_MAX+1]; | |
int command_index = 0; |
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
#include <SPI.h> | |
const int MINIMUM = 1000; | |
const int X_MINUS_PIN = 7; | |
const int X_PLUS_PIN = 6; | |
const int Y_MINUS_PIN = 5; | |
const int Y_PLUS_PIN = 4; | |
const int Z_MINUS_PIN = 3; | |
const int Z_PLUS_PIN = 2; |
OlderNewer