This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let axios = await require("@pipedreamhq/platform").axios; | |
function count(length) { | |
return Array.from({ length }, (_, i) => i + 1); | |
} | |
let days = count(7); | |
let hours = count(12); | |
let minutes = count(30); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "lib7842/api/odometry/customOdometry.hpp" | |
#include <cmath> | |
namespace lib7842 { | |
CustomOdometry::CustomOdometry(std::shared_ptr<ChassisModel> imodel, | |
const ChassisScales& ichassisScales) : | |
model(std::move(imodel)), chassisScales(ichassisScales) {} | |
void CustomOdometry::setScales(const ChassisScales& ichassisScales) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define NEW_RECORD(press) \ | |
.event = { \ | |
.key = {.col = 254, .row = 254}, \ | |
.time = timer_read() | 1, \ | |
.pressed = press, \ | |
} | |
bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) { | |
// count the number of keys that were held down before | |
uint8_t count = __builtin_popcount(combo->state); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"plugins | |
function! Cond(Cond, ...) | |
let opts = get(a:000, 0, {}) | |
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] }) | |
endfunction | |
call plug#begin('~/.vim/plugged') | |
" essentials | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-surround' "ys{motion}{type} ds{type} cs{type} v_S{type} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Distance Control | |
*/ | |
if(pDigital(DOWN)) { | |
robot.shooter->setDistanceToFlag(3.5_ft); | |
lastShootMacro = ShootController::shootMacros::off; | |
} else if(pDigital(LEFT)) { | |
robot.shooter->setDistanceToFlag(4.5_ft); | |
lastShootMacro = ShootController::shootMacros::off; | |
} else if(pDigital(UP)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// "C_Cpp.autocomplete": "Disabled", | |
"C_Cpp.default.cStandard": "c99", | |
"C_Cpp.default.cppStandard": "c++17", | |
"C_Cpp.errorSquiggles": "Disabled", | |
"C_Cpp.intelliSenseEngine": "Disabled", | |
"C_Cpp.autocomplete": "Disabled", | |
"C_Cpp.enhancedColorization": "Disabled", | |
"C_Cpp.updateChannel": "Insiders", | |
"cSpell.allowCompoundWords": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", | |
"profiles": | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "controllerPrinter.hpp" | |
using namespace pros::c; | |
namespace lib7842 { | |
ControllerPrinter::ControllerPrinter() : task(taskFnc, this) {} | |
void ControllerPrinter::print(int line, std::string str, pros::controller_id_e_t id) { | |
lines[id].at(line) = str; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'canary', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// arrays to store the three lines of text | |
std::array<std::string, 3> lines = {}; | |
// used to compare with previous text to see if an update to the controller is needed | |
std::array<std::string, 3> lastLines = {}; | |
// to print text, all you need to do is write to the `lines` array | |
// lines[lineNum] = "text"; | |
void controller_print(void*){ |
NewerOlder