Skip to content

Instantly share code, notes, and snippets.

This gist is meant to go along with a twitter thread. You can find that thread here.

I spent some time discussing my experience with Github Copilot. I talked about some of the social implications of this tech. But I also wanted to show examples of how it worked. In some cases, the experience was pretty surprising.

Because the code screenshots on twitter are not very accessible, I've created this gist to capture the code samples. And I've included some of my commentary in code comments.

@polotek
polotek / digital_subscriptions.txt
Created July 30, 2022 23:50
A list of the digital subscriptions we pay money for
1password
ABC Mouse
Airtable
Amazon Prime
Amazon Web Services
Angular University
Apple News
Audible (Aniyia)
Audible (Marco)
Bayview Hill SF

JavaScript Fundamentals

Part 1: Variables

Var & Scope

var greeting = 'Hello';
console.log(greeting); // prints: Hello

if (true) {
  var greeting = 'Hi';
@polotek
polotek / design_docke_template.md
Created April 3, 2019 03:06
Design Doc Template

Design Doc Title

Stakeholders

List stakeholders for project/feature.

Role Person
Dev Owner
Other Dev 1 (Engine)

Keybase proof

I hereby claim:

  • I am polotek on github.
  • I am polotek (https://keybase.io/polotek) on keybase.
  • I have a public key ASAbNgm_MHa7hpanU4BJsVfUrOrDQgmbgyGq8ZXRop-b0Ao

To claim this, I am signing this object:

JSON._dateReviver = function (k,v) {
if (v.length !== 24 || typeof v !== 'string') return v
try {return new Date(v)}
catch(e) {return v}
}
JSON.parseWithDates = function (obj) {
return JSON.parse(obj, JSON._dateReviver);
}
@polotek
polotek / db-launch.sh
Last active April 20, 2016 05:47 — forked from fancyremarker/db-launch.sh
Example: db-launch script to launch the Aptible postgresql database image
# A script for creating aptible postgres databases in containers
container=$(head -c 32 /dev/urandom | md5);
username=${USERNAME:-aptible};
passphrase=${PASSPHRASE:-password};
dbname=${DATABASE:-db}
cname=${CNAME}
extport=${EXTPORT:-5432}
image="${@: -1}";
# Create a data volume
def format_number(num):
numstr = str(num)
chunks = []
while numstr:
numstr, newchunk = numstr[:-3], numstr[-3:]
chunks.append(newchunk)
return ','.join(chunks[::-1])
@polotek
polotek / npm-woes.md
Last active June 14, 2016 16:18
What's wrong with the npm workflow?

Sara Chipps started this awesome thread about bundler vs. npm. You should check it out cause it's highly entertaining. https://twitter.com/SaraJChipps/status/484727602049859584

But I do want to get more info on the workflow problems people experience with npm. It has always been the simplest thing to me. But I'm also fully aware that perceptions are relative. Most ruby folks are totally fine with bundler even though it gives me constant headaches. But the bundler issues are well documented. This seems to be less true for npm. I want to gather some info about people's experiences. I promise I'll try to refrain from the canned "you're doing it wrong" response.

Also, we've already established that npm is network hungry and could do a better job of maintaining an offline cache. https://twitter.com/ag_dubs/status/484733343108706305 Nobody's arguing that. But I'm less concerned about feature requests here. I'm interested in where npm breaks for you.

Here's Ryan Florence. https://twitter.com/ryanflorence/status/4