stack diff steps
- Checkout & pull latest master
git checkout master && git pull --rebase origin master
- Cut branch from master
arc branch stacked_feature_1
- Make changes, add commits
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| def do_things(i, dry_run): | |
| print(i, dry_run) | |
| return i * 2, i * 3 | |
| def main(): | |
| build_ids = [1, 2, 3, 4, 5, 6, 7, 8, 9] |
| javascript: (function () { | |
| const vids = [ | |
| ...document.querySelectorAll('video'), | |
| ...document.querySelectorAll('audio'), | |
| ...[...document.querySelectorAll('iframe').values()].flatMap(el => { | |
| try { | |
| return [ | |
| ...el.querySelectorAll('video').values(), | |
| ...el.querySelectorAll('audio').values(), | |
| ]; |
| import openai | |
| class ChatGPT: | |
| """ A very simple wrapper around OpenAI's ChatGPT API. Makes it easy to create custom messages & chat. """ | |
| def __init__(self, model="gpt-3.5-turbo", completion_hparams=None): | |
| self.model = model | |
| self.completion_hparams = completion_hparams or {} | |
| self.history = [] | |
| self._messages = [] |
| export const COLLAPSED = 'collapsed'; | |
| export const EXPANDED = 'expanded'; | |
| export const COLLAPSIBLE_AND_EXPANDED = 'collapsable_and_expanded'; | |
| export enum SideFilterCollapsibleStates { | |
| COLLAPSED = 'collapsed', | |
| COLLAPSIBLE_AND_EXPANDED = 'collapsable_and_expanded', | |
| EXPANDED = 'expanded', | |
| } |
| import fs from 'fs'; | |
| import path from 'path'; | |
| import execa from 'execa'; | |
| import { runner } from 'hygen'; | |
| import Logger from 'hygen/dist/logger'; | |
| export type ArgsObject = { [key: string]: string | boolean }; | |
| export const readFileString = (path: string) => fs.readFileSync(path, 'utf8'); |
stack diff steps
git checkout master && git pull --rebase origin master
arc branch stacked_feature_1
| const MetricTypeDefs = ` | |
| # Primitive types for conveying geometric data | |
| type Metric { | |
| count: Int! | |
| } | |
| # The input for sendMetrics | |
| input MetricInput { | |
| name: String! | |
| points: [Float!]! |
| // Run with jest | |
| import knex from 'knex' | |
| import knexPgUpsert from '../knexPgUpsert' | |
| const db = knex({ client: 'pg' }) | |
| const taps = [ | |
| { |
| #!/usr/bin/env bash | |
| # Ask for the administrator password upfront. | |
| sudo -v | |
| # Keep-alive: update existing `sudo` time stamp until the script has finished. | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
| # Update the package manager's listings | |
| echo "Updating the package manager's listings" |
| var concat = require('gulp-concat') | |
| var concatCss = require('gulp-concat-css') | |
| var csso = require('gulp-csso') | |
| var del = require('del') | |
| var elmBins = require('elm') | |
| var glob = require('glob') | |
| var gulp = require('gulp') | |
| var jade = require('gulp-jade') | |
| var jadeConcat = require('gulp-jade-template-concat') | |
| var simpleSpawner = require('simple-spawner') |