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
3425198 2012-08-22 12:41:34 public add this to config/envoronments/development.rb to set pry as default rails console | |
3129493 2012-07-17 13:50:22 public find diffs in hashes |
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
silence_warnings do | |
begin | |
require 'pry' | |
IRB = Pry | |
rescue LoadError | |
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
var uniqueID = (function() { | |
var id = 0; // This is the private persistent value | |
// The outer function returns a nested function that has access | |
// to the persistent value. It is this nested function we're storing | |
// in the variable uniqueID above. | |
return function() { return id++; }; // Return and increment | |
})(); // Invoke the outer function after defining it. |
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
Object.byString = function(o, s) { | |
s = s.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties | |
s = s.replace(/^\./, ''); // strip a leading dot | |
var a = s.split('.'); | |
while (a.length) { | |
var n = a.shift(); | |
if (n in o) { | |
o = o[n]; | |
} else { | |
return; |
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
var target = "file destination"; | |
// check compartibility | |
// reset progress bar | |
$('.progress-bar').css('width', '0%').attr('aria-valuenow', 0); | |
var xhr=new XMLHttpRequest(); | |
xhr.overrideMimeType('application/octet-stream'); | |
xhr.open('GET', target, true); | |
xhr.responseType='arraybuffer'; | |
xhr.send(); | |
xhr.onprogress=function(e){ |
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
cat file1.txt file2.txt| sort | uniq -d |
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 log --oneline --graph --decorate --all |
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
SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ; | |
SELECT * FROM NLS_DATABASE_PARAMETERS |
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
- go to first char of a line and use blockwise visual mode (CTRL-V) | |
- go down/up until first char of all lines I want to comment out are selected | |
- use SHIFT-I and then type my comment character (# for ruby) | |
- use ESC to insert the comment character for all lines |
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
find . -type f -exec sed -i -e 's/<source>/<destination>/g' {} \; |
OlderNewer