Lets say you have a zipcode file paramount.csv
:
90242,5121
90280,8140
90280,8168
90280,8178
90280,8238
90723,1
90723,2
Foo foo foo |
Lets say you have a zipcode file paramount.csv
:
90242,5121
90280,8140
90280,8168
90280,8178
90280,8238
90723,1
90723,2
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
<!-- | |
You need to run this in a webserver environment over HTTP for it to work. | |
Start a basic server with: | |
```bash | |
$ http-server | |
``` | |
Then navigate to: http://localhost:8080/create-app-user.html |
{ | |
"name": "Launch Chrome against localhost, with sourcemaps", | |
"type": "chrome", | |
"request": "launch", | |
"url": "http://localhost:4200", | |
// This forces chrome to run a brand new instance, allowing existing | |
// chrome windows to stay open. | |
"userDataDir": "${workspaceRoot}/.vscode/chrome", | |
"sourceMaps": true, | |
"webRoot": "${workspaceRoot}", |
{ | |
"window.zoomLevel": 1, | |
"vim.useCtrlKeys": true, | |
"editor.tabSize": 2, | |
"editor.fontSize": 11, | |
"editor.renderLineHighlight": false, | |
"vsicons.dontShowNewVersionMessage": true, | |
"workbench.activityBar.visible": false, | |
"typescript.check.workspaceVersion": false, |
var fs = require('fs'); | |
var readline = require('readline'); | |
var stream = require('stream'); | |
var instream = fs.createReadStream('votes.txt'); | |
var outstream = new stream; | |
var rl = readline.createInterface(instream, outstream); | |
var ballotCount = 0; | |
var ballotVotes = []; |
require 'ruby-prof' | |
require 'fileutils' | |
require 'launchy' | |
# https://gist.github.com/hiltmon/1929287 | |
# Saves profs to tmp/performance/ | |
# Make sure you `gem install ruby-prof` first | |
# Profiling::Profiler.call('import') do | |
# # Your slow code here | |
# end | |
# Results are saved in tmp/performance |
require 'benchmark/ips' | |
FooBar = Struct.new(:foo, :bar) do | |
def self.call(foo:, bar:) | |
new(foo, bar) | |
end | |
end | |
Benchmark.ips do |b| | |
b.report('creating a struct') do |
require 'benchmark/ips' | |
class FooBar | |
attr_accessor :foo, :bar | |
def initialize(foo:, bar:) | |
self.foo = foo | |
self.bar = bar | |
end | |
end |