Skip to content

Instantly share code, notes, and snippets.

View kadams54's full-sized avatar
🏠
Working from home

Kyle Adams kadams54

🏠
Working from home
View GitHub Profile
@kadams54
kadams54 / 00_README.md
Last active October 3, 2023 19:01
Example of chaining functions

All the programs below implement these steps:

  1. Generate a list of 1-8, not including 8: [1, 2, 3, 4, 5, 6, 7]
  2. Filter that list to even values: [2, 4, 6]
  3. Return each value N repeated N times: [2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6]
@kadams54
kadams54 / 00_README.md
Last active October 2, 2023 14:16
Grokking Simplicity: Chapter 12 Functional iteration

Python's equivalents:

  1. map()
  2. filter()
  3. functools.reduce()

Several notes:

Python uses the reverse order for the arguments for the map()/filter() defined in the book: in Python, the function comes first, then the collection.

Django-environ

Installing

pip install django-environ

OR

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kadams54
kadams54 / 0 - README.md
Last active August 5, 2020 21:37
StandardJS (ESLint + Pretter) config for Cypress projects

Style

This setup adheres to JavaScript Standard Style; unfortunately due to conflict between standard's ruleset and Chai assertions, we have to acheive this by using eslint directly + the Standard rules. Since we can't use standard directly, we also throw in Prettier for code formatting. Specifically, we use prettier-standard to keep all of the pieces working together nicely. What's that mean for you? Well, here's the scoop on setting up a few editors for linting/formatting fun.

Vim

@kadams54
kadams54 / generator_config.txt
Created November 14, 2018 15:09
Configuration file for FontSquirrel's Web Font Generator to kick out Raleway normal/bold with lining numeric subset.
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"expert","formats":["woff2"],"tt_instructor":"default","fix_gasp":"xy","fix_vertical_metrics":"Y","metrics_ascent":"","metrics_descent":"","metrics_linegap":"","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","ot_features":["lnum","tnum"],"css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"}
@kadams54
kadams54 / ngrok.yml
Created November 6, 2017 16:49
.ngrok2/ngrok.yml
tunnels:
rails:
proto: http
addr: 3000
webpack:
proto: http
addr: 8080
host_header: localhost:8080
@kadams54
kadams54 / keybase.md
Created October 30, 2017 15:50
keybase.md

Keybase proof

I hereby claim:

  • I am kadams54 on github.
  • I am kadams54 (https://keybase.io/kadams54) on keybase.
  • I have a public key ASCN5vuWTrjmhRXT2voEkvEt2ihQ1S_3oxh_0kjkDw-c9Qo

To claim this, I am signing this object:

views/bundle-import-notifications.js
views/ghost-deployer-extension.js
views/utils.js
views/topology/service.js
views/topology/relation.js
utils/environment-change-set.js
utils/bundle-importer.js
extensions/autodeploy-extension.js