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
var express = require('express'); | |
var sys = require('sys'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
function consumer() { |
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
node_modules | |
config.js |
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
var express = require('express'); | |
var sys = require('sys'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
function consumer() { |
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
Rails.logger.info "Some debugging info I want to see in my development log." |
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
ActiveRecord::Base::connection::execute("COMMIT") |
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 MyController < ApplicationController | |
def get_text | |
data = "generated by rails controller" | |
send_data(data, :filename => "rails_generated.txt", :type => "text/plain") | |
#send_file 'evidence_tmp/tmp.zip', :type => "application/zip" # => when the file already exists. | |
end | |
end |
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
h1. 変更が消えてしまった!?その対応 | |
せっかく実施したコードへの修正が消えてしまう、これほど開発者をがっかりさせることは無いでしょう。 | |
Gitを使えば、消えてしまったように見える変更を復活できることがあります。 | |
h2. 大原則 | |
復活できる可能性があるのは、「何らかの形でGitに履歴を残してある歴史」だけです。 | |
たとえば、以下のファイルを復活させることはできません。 |
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
h1. Gitライフを便利にする設定(alias編) | |
こんな人に効く記事です。 | |
* Gitのコマンドが長いと感じている | |
* Gitのログを見やすくするコマンドを知りたい | |
~/.gitconfigに以下を追記してみましょう。 | |
<pre> | |
[alias] |
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
MYAPP.namespace('MYAPP.utilities.Array'); | |
MYAPP.utilities.Array = (function () { | |
// dependencies | |
var uobj = MYAPP.utilities.object, | |
ulang = MYAPP.utilities.lang; | |
// private properties and methods... | |
var Constr; |
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
MYAPP.namespace('MYAPP.utilities.array'); | |
MYAPP.utilities.array = (function () { | |
// dependencies | |
var uobj = MYAPP.utilities.object, | |
ulang = MYAPP.utilities.lang, | |
// private properties | |
array_string = "[object Array]", ops = Object.prototype.toString; |
OlderNewer