⭐ = favorite
Paul Ford: What Is Code? - It’s long but nothing ever got me so excited about learning to code as much as this.
- Free (mostly)
| #!/bin/bash | |
| # A script to set up a new mac. Uses bash, homebrew, etc. | |
| # Focused for ruby/rails development. Includes many utilities and apps: | |
| # - homebrew, rvm, node | |
| # - quicklook plugins, terminal fonts | |
| # - browsers: chrome, firefox | |
| # - dev: iterm2, sublime text, postgres, chrome devtools, etc. | |
| # - team: slack, dropbox, google drive, skype, etc |
| // 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. | |
| /* cSpell:disable */ | |
| module.exports = { | |
| config: { | |
| // Choose either "stable" for receiving highly polished, | |
| // or "canary" for less polished but more frequent updates |
⭐ = favorite
Paul Ford: What Is Code? - It’s long but nothing ever got me so excited about learning to code as much as this.
| #!/usr/local/bin/python3 | |
| # List tasks with fab2 -l | |
| import os | |
| import os.path as path | |
| from fabric2 import Config, Connection, task | |
| import patchwork.transfers as transfer | |
| # Define values in .env file. |
| require('dotenv').config(); | |
| const { AsyncParser } = require('json2csv'); | |
| const fs = require('fs'); | |
| const MongoClient = require('mongodb').MongoClient; | |
| const url = `mongodb://localhost:27017`; | |
| const HEADERS = ['first_name', 'last_name', 'middle_name', 'id']; | |
| const FIELDS = ['name.first_name', 'name.last_name', 'name.middle_name', 'id']; |
| # This command would be run from the parent folder that: | |
| # 1. contains the file(s) to be converted | |
| # 2. has subdirectories that contain files to be converted | |
| # 3. both of the above. | |
| # This example finds all .tif files and converts them to .pdf, | |
| # but any conversion supported by ImageMagick could be used here. | |
| # If you don't have ImageMagick installed, you can do so here (https://imagemagick.org/script/download.php) | |
| # for linux |
| using System; | |
| public static class Leap | |
| { | |
| public static bool IsLeapYear(int year) | |
| { | |
| bool multipleOf4 = YearIsDivisibleByFactor(year, 4); | |
| bool multipleOf100 = YearIsDivisibleByFactor(year, 100); | |
| bool multipleOf400 = YearIsDivisibleByFactor(year, 400); |
| (ns hello-world) | |
| (defn hello [] "Hello, World!" ) |
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| main() { | |
| echo "Hello, World!" | |
| } | |
| main |