I hereby claim:
- I am upaymeifixit on github.
- I am upaymeifixit (https://keybase.io/upaymeifixit) on keybase.
- I have a public key ASCL88ABTDCru4ljMXfgoPRSCw_JQTFvYyscKt69zCjiGQo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
set -e | |
# Usage: Run this command from anywhere. It will back up the original lscpu | |
# command, and replace it with a new command that outputs hard-coded CPU | |
# information. | |
program="lscpu" | |
program_path="$(which "$program")" | |
program_backup_path="$program_path.bak" |
#!/usr/bin/env bash | |
set -e | |
# This script backs up the specified program in the current path, and creates a | |
# new one in its place. (this will only be done if the backup does not already | |
# exist) The new (fake) specified program will forward all arguments to the | |
# backed up dd command and log the output of the backed up dd command. It will | |
# also log when the dd command was run and with which arguments to | |
# /var/log/{SPECIFIED_PROGRAM}-calls.log | |
# |
import { GoogleSpreadsheet } from "google-spreadsheet"; | |
import * as dotenv from "dotenv"; | |
dotenv.config(); | |
// Follow these instructions to download the json: https://theoephraim.github.io/node-google-spreadsheet/#/getting-started/authentication?id=service-account | |
import serviceAccountCredentials from "./paciolan-test-transactions-cac2ff699254.json" assert { type: "json" }; | |
// Set up and connect to spreadsheet | |
const doc = new GoogleSpreadsheet(process.env.SPREADSHEET_ID); | |
await doc.useServiceAccountAuth(serviceAccountCredentials); |
################################################ | |
# Guide to configure WSL2 Squid, SSH, and Fish # | |
################################################ | |
### Run all of this inside an Ubuntu WSL instance (must enable WSL2 and install Ubuntu WSL first) | |
# Allow us to start ssh and squid without a password | |
# echo "%sudo ALL=(ALL) NOPASSWD: /etc/init.d/ssh" | sudo tee -a /etc/sudoers.d/password-inits.conf | |
# echo "%sudo ALL=(ALL) NOPASSWD: /etc/init.d/squid" | sudo tee -a /etc/sudoers.d/password-inits.conf | |
echo "$(whoami) ALL = (ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/passwordless-sudo |
I hereby claim:
To claim this, I am signing this object:
const Jimp = require("jimp"); | |
const async = require("async"); | |
const leftPad = require('left-pad'); | |
const fs = require('fs'); | |
const promisify = require('util').promisify; | |
const moment = require('moment'); | |
const readdir = promisify(fs.readdir); | |
const stat = promisify(fs.stat); |
/** | |
* @author: Joshua Gibbs | |
* @title: ICA Ch. 15-2 | |
* @date: 3/8/2017 | |
* @file: ICA15_2.java | |
* @class: CS 141 – Programming and Problem Solving | |
* @purpose: | |
* Given a string, return recursively a "cleaned" string. | |
* You cleaned string will have adjacent chars that are the same have been reduced to a single char. | |
* So "yyzzza" yields "yza". |
/** | |
* @author: Joshua Gibbs | |
* @title: ICA Ch. 15-1b | |
* @date: 3/6/2017 | |
* @file: ICA15_1b.java | |
* @class: CS 141 – Programming and Problem Solving | |
* @purpose: | |
* Given a string, compute recursively (no loops) a new string. | |
* The new string will replace all appearances of "pi" with "3.14". | |
* (You must use a method which calls itself for a recursive solution) |
/** | |
* @author: Joshua Gibbs | |
* @title: ICA Ch. 11-2b | |
* @date: 3/3/2017 | |
* @file: ICA15_1a.java | |
* @class: CS 141 – Programming and Problem Solving | |
* @purpose: | |
* Given a non-negative int n, compute recursively (no loops) the count of the | |
* occurrences of 8 as a digit. (Except that an 8 with another 8 immediately to | |
* its left counts double, so 8818 yields 4.) Note that mod (%) by 10 yields the |
/** | |
* @author: Joshua Gibbs | |
* @title: ICA Ch. 11-2b | |
* @date: 3/1/2017 | |
* @file: ICA11_2b.java | |
* @class: CS 141 – Programming and Problem Solving | |
* @purpose: | |
* The file "datafile" provided to you on Blackboard begins with a single long. | |
* The long tells you the offset to reach a single int piece of data from within the same file. | |
* Using the RandomAccessFile class, write a program that retrieves the int piece of data. |