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
| # First find the commit sha1(s). | |
| git log | |
| # Then, grab the commit sha1(s). | |
| # For a patch of a single commit. | |
| git format-patch -M -C 3cd894a1bc36867d65119b9a490a3813c0d8066a~1..3cd894a1bc36867d65119b9a490a3813c0d8066a | |
| # Before applying, check what will be happen. | |
| git apply --stat <PATCH_NAME>.patch |
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
| git checkout feature_branch -- file /path/fo/wanted/file |
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
| db.measured_data.update( { "_id" : { $exists : true } }, {$set: {"serial_number": "536883257"}}, false, true); |
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
| git fetch <REMOTE_REPO> master:<YOUR_NEW_REMOTE_REPO_BRANCH> | |
| # Now you can do | |
| # | |
| # git checkout <YOUR_NEW_REMOTE_REPO_BRANCH> | |
| # git merge <YOUR_NEW_REMOTE_REPO_BRANCH> | |
| # | |
| # and so on ... |
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 sum | |
| # Summarizes two numbers. | |
| constructor:(a,b)-> | |
| return a+b | |
| c = sum(3,4) #=> 7 |
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 module behavior | |
| class Module | |
| keywords = ['extended', 'included', 'initialize'] | |
| @extend = (obj) -> | |
| for key, value of obj when key not in keywords | |
| @[key] = value | |
| obj.extended?.apply(@) | |
| this | |
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
| Ext.apply(Ext.String,{ | |
| camelcase: function(str){ | |
| var splittedString = str.split("_"); | |
| return Ext.String.capitalize(splittedString[0]) + Ext.String.capitalize(splittedString[1]); | |
| } | |
| }); |
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
| Gem::Specification.new do |s| | |
| s.name = 'clockwork' | |
| s.version = '0.1' | |
| s.platform = Gem::Platform::RUBY | |
| s.author = 'Daniel Schmidt' | |
| s.email = 'dsci@code79.net' | |
| s.summary = 'Clockwork Orange' | |
| s.description = 'Collection of Time extensions.' | |
| s.files = ['clockwork.rb',] |
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 dependencies | |
| ### | |
| require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
| require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
| express = require 'express' | |
| app = module.exports = express.createServer() | |
| RedisStore = require 'connect-redis' |