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
start_date = str(get_format_date(begin_timestamp)) | |
end_date = str(get_format_date(end_timestamp)) | |
match = { | |
'date': { | |
'$gte': start_date, | |
'$lte': end_date, | |
} | |
} |
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
github workflow crash solution | |
I can't tell you why it worked, but deleting the workflow's working directory | |
(/Users/$USER/Library/Application Support/Alfred 3/Workflow Data/de.gh01.alfred.github) | |
cleared the cache and things seem to work again. |
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
on alfred_script(q) | |
if application "iTerm2" is running or application "iTerm" is running then | |
run script " | |
on run {q} | |
tell application \":Applications:iTerm.app\" | |
activate | |
try | |
select first window | |
set onlywindow to false | |
on error |
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 checkout tags/1.1.4 |
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
.explain("executionStats") |
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
.hint({ quantity: 1, type: 1 }).explain("executionStats") |
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
db.collection.createIndex( { a: 1 }, { unique: true } ) |
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
In iTerm2, preferences>profiles>tab general, there is an option in Command called send text at start that executes any command you put there after login. | |
pyenv activate zhangpeng |
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 bulk = db.gddata_daily_stats.initializeOrderedBulkOp(), | |
count = 0; | |
// List "all" fields that make a document "unique" in the `_id` | |
// I am only listing some for example purposes to follow | |
db.gddata_daily_stats.aggregate([ | |
{ "$group": { | |
"_id": { | |
"account_name" : "$account_name", | |
"date": "$date", |
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 match = { | |
'date': { | |
'$gte': '2017-06-24', | |
'$lte': '2017-06-30', | |
} | |
} | |
var group = { | |
'_id': {'account_name':'$account_name','region':'$region'}, |
OlderNewer