I hereby claim:
- I am ian-bartholomew on github.
- I am oldmeaty (https://keybase.io/oldmeaty) on keybase.
- I have a public key ASD_MZVi6C3yqV3sGvBkgWLp-rTMi0SteZnKU3EFapwoDgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
To transpile cjsx to jsx:
depercolate --prefer-const <filename>
To then update the jsx to the newest React API (info):
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c
and [c
.
Choose which version you want to keep with :diffget //2
or :diffget //3
(the //2
and //3
are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
provider "aws" { | |
region = "us-east-1" | |
} | |
resource "aws_security_group" "instance" { | |
name = "terraform-example-instance" | |
ingress { | |
from_port = "${var.server_port}" | |
to_port = "${var.server_port}" |
#!/bin/sh | |
DOCKER=`which docker` | |
IMAGE='owasp/zap2docker-weekly' | |
URL='https://www.example.com' | |
ZAP_API_PORT='8090' | |
# Start our container | |
CONTAINER_ID=`$DOCKER run -d \ | |
-p $ZAP_API_PORT:$ZAP_API_PORT \ |
/* | |
A function that computes a factorial recursively. | |
A factorial is when you take a number n and multiply by each preceding integer until you hit one. | |
n * (n-1) * (n-2) ... * 3 * 2 * 1 | |
Call the function factorial | |
factorial(1) = 1 | |
factorial(2) = 2 | |
factorial(3) = 6 |
function order(words){ | |
// return empty string for undefined | |
if (words === undefined) { | |
return ''; | |
} | |
let rval = []; | |
let pieces = words.split(' '); | |
for (let i=0; i<10; i++) { | |
if (pieces.hasOwnProperty(i)) { |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'csv' | |
require 'spidr' | |
CSV.open('pets_crawl.csv', 'wb') do |csv| | |
csv << ['page title', 'page url'] | |
Spidr.site('http://www.petsmart.com', :ignore_links => [/gsi/]) do |spider| | |
spider.every_html_page do |page| |