- Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting.
- Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user. Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval.
- NEVER edit
.envor any environment variable files—only the user may change them. - Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees.
- Moving/renaming and restoring files is allowed.
- ABSOLUTELY NEVER run destructive git operations (e.g.,
git reset --hard,rm,git checkout/git restoreto an older commit) unless the user gives an explicit, written instruction in this conversation. Treat t
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
| for d in */ ; do | |
| cd $d | |
| git log --since 2015-03-01 --until 2016-06-30 --reverse --pretty=format:https://github.com/civicsource/${d}commit/%H,%an,%ad,\"%s\" --date=iso > ../${d::-1}.csv | |
| cd .. | |
| done |
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
| @mixin all-retina-sprites($map, $map2x) { | |
| @media (min--moz-device-pixel-ratio: 1.5), | |
| (-o-min-device-pixel-ratio: 3/2), | |
| (-webkit-min-device-pixel-ratio: 1.5), | |
| (min-device-pixel-ratio: 1.5), | |
| (min-resolution: 1.5dppx) { | |
| $base-class: sprite-map-name($map); | |
| .#{$base-class}-all-retina-sprites { |
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
| function switchGrails() { | |
| echo "Switching to groovy version: $1" | |
| echo "Switching to grails version: $2" | |
| sudo rm /usr/local/{groovy,grails} | |
| sudo ln -s /usr/lib/groovy/$1 /usr/local/groovy | |
| sudo ln -s /usr/lib/grails/$2 /usr/local/grails | |
| echo "Done!" | |
| ls -latr /usr/local/{groovy,grails} | |
| } |
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
| # Run rake db:size to get a print of your database size in bytes. | |
| # Run rake db:tables:size to get the sizes for individual tables | |
| # Works for MySQL and PostgreSQL. Not tested elsewhere. | |
| namespace :db do | |
| desc 'Print data size for entire database' | |
| task :size => :environment do | |
| database_name = ActiveRecord::Base.connection.instance_variable_get("@config")[:database] | |
| adapter = ActiveRecord::Base.connection.adapter_name.downcase |
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
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:[email protected]", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |