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
([]).map.call(document.querySelectorAll('.diffstat.tooltipped'), (n) => { | |
const linesChanged = +n.innerHTML.match(/^\d+/)[0]; | |
if(linesChanged > 100) { | |
// Log the line delta and the name of the file. | |
console.log(n, n.parentNode.querySelector('a')); | |
} | |
return linesChanged; | |
}); |
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
column -s, -t < csv_file.csv | less -#2 -N -S |
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
([]).map.call(document.querySelectorAll('[data-hovercard-id]'), (el) => { return el.getAttribute('data-hovercard-id'); } ) |
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
// Invoke the first argument (needs to be a function), with `1` as the `this` context and `2` as the argument | |
console.log.call.apply(a => a, [1, 2]) // -> 2 | |
console.log.call.apply(function(a,b) { return this.ab + a + b; }, [{ab: 19}, 2, 3]) // -> 24 |
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
git status --porcelain | cut -c4- | xargs rm |
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
general: | |
artifacts: | |
- "log" | |
- "npm-debug.log" | |
- "yarn-error.log" | |
machine: | |
node: | |
version: 6.10.1 |
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
@import './repeat.scss' | |
#{repeat('.jasmine-passed', 15)} a { | |
color: aliceblue !important; | |
} |
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
git log --diff-filter=D --summary | grep -B 10 -A 10 "delete mode 100644 app/assets/javascripts/backbone/features/task-tracker/details/layouts/main.coffee" |
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
# Get the files changed in SHA | |
git diff-tree --no-commit-id --name-only -r <SHA> > theFiles | |
# Inline replace and backup file (b/c of Mac) for leading newlines | |
xargs -0 -n 1 sed -ie '/./,$!d'< <(tr \\n \\0 <theFiles) | |
# Same as above, but for trailing newlines | |
find . -type f -name '*.coffee' -exec sed -ie -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; | |
# Remove the backup files (assuming only Coffee files changed) |
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 AssignmentScheduleDayCell extends FormattedHoursCell | |
className: -> | |
classes = [] | |
possibleMinutes = @model.get('possible_work_day_minutes')[@date] | |
globalMinutes = @model.get('global_scheduled_minutes')[@date] | |
if globalMinutes > possibleMinutes && @model.get('scheduled_minutes')[@date] | |
classes.push('overallocated') |