Skip to content

Instantly share code, notes, and snippets.

@akamyshanov
akamyshanov / gmail-auto-archive.js
Created Sep 18, 2018
GMail Auto Archive script for Google Scripts
View gmail-auto-archive.js
function gmailAutoarchive() {
var threads = GmailApp.search("in:inbox label:auto-archive older_than:2d");
Logger.log("found " + threads.length + " threads:");
for(var i = 0; i < threads.length; i++) {
var thread = threads[i];
Logger.log((i+1) + ". " + thread.getFirstMessageSubject());
}
var batch_size = 100;
@akamyshanov
akamyshanov / nuget-pack-all.ps1
Last active Aug 23, 2017
Commands NuGet to pack all .nuspec files in directory
View nuget-pack-all.ps1
param (
[string]$Version = "0.0.0-dev",
[string]$OutputDirectory = "bin"
)
Get-ChildItem $OutputDirectory -Include "*.nupkg" -Depth 1 | Remove-Item
$nuspecs = Get-ChildItem "*.nuspec" -File -Recurse
foreach($nuspec in $nuspecs) {
nuget pack $nuspec.FullName -OutputDirectory "bin" -Version $version
You can’t perform that action at this time.