Skip to content

Instantly share code, notes, and snippets.

@vdavez
vdavez / githubPost.js
Created November 6, 2015 20:15
Micro-purchase Google Apps Script
function githubPost() {
var ss = SpreadsheetApp.openById(ssID) // replace the ssID with the Spreadsheet ID
var sheet = ss.getSheetByName("Form Responses 1");
var formResponses = FormApp.getActiveForm().getResponses();
var res = formResponses[formResponses.length-1].getItemResponses();
var amt = res[0].getResponse();
var title = "Load Schedule 70 data into CALC. >>> Current bid: " + amt + " <<<"
@vdavez
vdavez / results.json
Created November 9, 2015 15:34
Fed Reg -- FAR
{"results":[{"type":"Proposed Rule","document_number":"2015-26581","title":"Federal Acquisition Regulation: Revision to Standard Forms for Bonds","excerpts":"DoD, GSA, and NASA are proposing to revise Standard Forms prescribed by the Federal Acquisition Regulation (FAR) for contracts involving bonds and other financial protections. The revisions are aimed at clarifying liability limitations and expanding the &#8230; ","abstract":"DoD, GSA, and NASA are proposing to revise Standard Forms prescribed by the Federal Acquisition Regulation (FAR) for contracts involving bonds and other financial protections. The revisions are aimed at clarifying liability limitations and expanding the options for organization types.","publication_date":"2015-10-20","html_url":"https://www.federalregister.gov/articles/2015/10/20/2015-26581/federal-acquisition-regulation-revision-to-standard-forms-for-bonds","pdf_url":"http://www.gpo.gov/fdsys/pkg/FR-2015-10-20/pdf/2015-26581.pdf","public_inspection_pdf_url":"https://s3.amazonaws.co
@vdavez
vdavez / md-inline.js
Last active November 22, 2015 19:30
Inline imgs to markdown
var fs = require('fs');
// Read file passed in command line args
var f = fs.readFileSync(process.argv[2],'utf8');
// Replace markdown img regex with <img> with base64 data uri & pipe to stdout
var re =/!\[\]\(([^]*?)\)/g;
process.stdout.write(f.replace(re, replaceImagesWithBase64));
/**
@vdavez
vdavez / mandatoryTrainings.gs
Created November 24, 2015 15:01
Mandatory Trainings google script
function mandatoryTrainings() {
var data = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
for (i in data) {
// Here, each row is d
// Skip the header row
if (i === "0") {
continue;
}
@vdavez
vdavez / large_vendors.R.ipynb
Last active October 14, 2017 13:57
S70 data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vdavez
vdavez / onboard.js
Last active October 14, 2017 13:57
Onboarding
#!/usr/bin/env node
var utils = require('./utils');
/**
* @param {Object} - the configuration object
*/
var addUser = (opts) => {
utils._addToGithub(opts.user);
utils._addToSlack(opts.user, opts.channel);
}
@vdavez
vdavez / app.py
Last active March 11, 2016 13:50
mp-timing
# import libraries
import json
import statistics
import datetime
def convert_time(timeStr):
""" convert_time
A helper function to convert a ISO datetime string into a datetime object
@params timeStr - a datetime string in isoformat
@returns datetime object
@vdavez
vdavez / githubIssuesToCsv.py
Last active December 12, 2016 19:30
gh-issues-to-csv.py
import requests
import json
import sys
import csv
def getIssues(url):
"""
@param {url} The url of the github issues
@return the json object
@vdavez
vdavez / keybase.md
Created November 12, 2016 04:08
keybase

Keybase proof

I hereby claim:

  • I am vzvenyach on github.
  • I am vdavez (https://keybase.io/vdavez) on keybase.
  • I have a public key ASAG0tz4DCm_UvTlDYi1gvNmkSgdTy6Ls6gCADr5L4GpWQo

To claim this, I am signing this object:

@vdavez
vdavez / PublicBurdenResearch.ipynb
Last active February 12, 2017 22:29
Public Burden Research
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.