I hereby claim:
- I am dogeared on github.
- I am afitnerd (https://keybase.io/afitnerd) on keybase.
- I have a public key whose fingerprint is F1F1 6F30 807A 1D37 66CF 5771 2BCE AE15 9FAC E6B4
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| app.post('/api/v1/sem/generate_report', function(req, res) { | |
| inspect("Java requested report for account: " + req.body.account_id); | |
| ReportService.generate(req, res, function(credentials, params) { | |
| ReportService.generateReportFor(credentials, params, res, function(engineId) { | |
| ReportService.downloadReportFor[credentials.engine](params, res, credentials, engineId, function(reportFile) { | |
| ReportService.uploadToS3(config.S3.reportBucket + config.S3.s3Suffix, params.s3_storage_path, res, reportFile, function(message) { | |
| res.send(message); | |
| }); |
| sanitizeFile: function(reportFile, columnAdditions, rowDeletions, callback, retryCount) { | |
| var rs = fs.createReadStream(reportFile, { encoding:'utf8' }) | |
| , outputFile = path.dirname(reportFile) + "/" + path.basename(reportFile) + ".sanitized" | |
| , ws = fs.createWriteStream(outputFile); | |
| rs.on('data', function(data) { | |
| var flushed = ws.write(data); | |
| if (!flushed) { rs.pause(); } | |
| }); | |
| public String post(Service serviceName, Map<String, String> params) throws IOException { | |
| StringBuffer sb = new StringBuffer(); | |
| for (String key:params.keySet()) { | |
| String value = params.get(key); | |
| sb.append(key+"="+value+"&"); | |
| } | |
| String urlParameters = sb.substring(0,sb.length()-1); | |
| URL url; |
| downloadReport: { | |
| 'default': function(reportFile, requestData, callback) { | |
| var file = fs.createWriteStream(requestData.filename); | |
| var downloadUrl = url.parse(requestData.reportingDownloadUrl); | |
| var local = http.createClient(443, downloadUrl.host, secure=true); | |
| requestData.headers['host'] = downloadUrl.host; | |
| var request = local.request('GET', downloadUrl.pathname + downloadUrl.search, requestData.headers); | |
| request.on('response', function (response) { |
| import java.util.*; | |
| public class t { | |
| public static void main(String[] args) { | |
| String[] s = {"1", "2", "3"}; | |
| String[] t = Arrays.copyOfRange(s, 1, 3); | |
| System.out.println("Length of t: " + t.length); | |
| System.out.println(t[0]); | |
| System.out.println(t[1]); |
| var _ = require('underscore') | |
| var levers = [ | |
| { id: '1', val: 'one'}, | |
| { id: '2', val: 'two'}, | |
| { id: '3', val: 'three'}, | |
| ] | |
| var ids = ['1', '3'] |
| "SELECT * FROM meetings WHERE meetingID = '1';" | |
| "SELECT * FROM meetingAddress WHERE meetingID = '1';" | |
| "SELECT * FROM districts WHERE districtID = '1';" |
| module.exports = function(data) { | |
| var _data = data | |
| var filter = { | |
| byType: function(query) { | |
| // alter _data | |
| return this | |
| }, | |
| byName: function(query) { | |
| // alter _data |
| #! /usr/bin/ruby | |
| # | |
| require 'rubygems' | |
| require 'json' | |
| require 'open-uri' | |
| user = 'YOUR GITHUB USERNAME' | |
| pass = 'YOUR GITHUB PASSWORD' | |
| repo = 'workmarket/application' |