Skip to content

Instantly share code, notes, and snippets.

View ilanbiala's full-sized avatar

Ilan Biala ilanbiala

View GitHub Profile
@ilanbiala
ilanbiala / federal_tax_payment_calculator.py
Last active December 30, 2020 21:44
Quick calculator for federal tax payments for single filers in tax year 2020
from typing import List
# Single filer tax brackets for 2020 - 2021
tax_bracket_rates = {
(0, 9875): 0.1,
(9876, 40125): 0.12,
(40126, 85525): 0.22,
(85526, 163300): 0.24,
(163301, 207350): 0.32,
(207351, 518400): 0.35,
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 33160 2264 ? Ss Jul03 0:00 init
root 2 0.0 0.0 0 0 ? S Jul03 0:00 [kthreadd/2319]
root 3 0.0 0.0 0 0 ? S Jul03 0:00 [khelper/2319]
root 166 0.0 0.0 19420 592 ? S Jul03 0:00 upstart-udev-br
root 213 0.0 0.0 35116 668 ? Ss Jul03 0:00 /lib/systemd/sy
root 300 0.0 0.0 23492 1328 ? Ss Jul03 0:00 /usr/sbin/vsftp
root 390 0.0 0.0 23600 1020 ? Ss Jul03 0:01 cron
root 399 0.0 0.0 61316 2608 ? Ss Jul03 0:00 /usr/sbin/sshd
mongodb 403 0.1 0.4 533788 28768 ? Ssl Jul03 28:11 /usr/bin/mongod
var Promise = require('bluebird'),
child_process = require('child_process'),
path = require('path'),
s = require('underscore.string'),
generators = require('yeoman-generator'),
log = require('./log');
var exec = function (cmd) {
return new Promise(function (resolve, reject) {
child_process.exec(cmd, function (err, res) {
@ilanbiala
ilanbiala / index.js
Created September 17, 2015 01:31
attempt at windows
var Promise = require('bluebird'),
child_process = require('child_process'),
path = require('path'),
s = require('underscore.string'),
generators = require('yeoman-generator'),
log = require('./log');
var exec = function (cmd) {
return new Promise(function (resolve, reject) {
child_process.exec(cmd, function (err, res) {
{
"browser": true, // Standard browser globals e.g. `window`, `document`.
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
"camelcase": false, // Permit only camelcase for `var` and `object indexes`.
"curly": false, // Require {} for every new block or scope.
"eqeqeq": true, // Require triple equals i.e. `===`.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef": true, // Prohibit variable use before definition.
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
@ilanbiala
ilanbiala / gulpfile.js
Last active August 29, 2015 14:15
Plato
var glob = require('glob'),
plato = require('plato');
function plato(cb) {
var files = glob.sync('./app/**/*.js')
.concat(glob.sync('./config/**/*.js'))
.concat(glob.sync('./public/modules/**/*.js'));
return plato.inspect(files, './report', { title: 'Plato report' }, function(reports) {
var overview = plato.getOverviewReport(reports);
var port = 9418;
var http = require('http'),
querystring = require('querystring'),
exec = require('child_process').exec,
forever = require('forever-monitor'),
Monitor = forever.Monitor;
process.on('uncaughtException', function(error) {
console.error('Uncaught exception: ' + error.message);
console.trace();