A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
- Headers
- Links
- Bold
- Emphasis
- Deletions
| -- SELECT polygon centroid as latitude/longitude in PostGIS | |
| SELECT | |
| st_x(st_transform(ST_Centroid(the_geom),4326)) as lat, | |
| st_y(st_transform(ST_Centroid(the_geom),4326)) as long | |
| FROM table; |
| #!/usr/bin/env bash | |
| function minikube_reset_vbox_dhcp_leases() { | |
| # Check OS version | |
| case $OSTYPE in | |
| darwin*) | |
| VBOX_CONFIG_DIR=Library | |
| ;; | |
| linux*) |
| /* | |
| Copyright (c) 2015 Paul Jolly <[email protected]) | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| const App = ({name}) => { | |
| return ( | |
| <h1>Hello {name}</h1> | |
| ); | |
| }; | |
| ReactDOM.render(<App name="World" />, document.getElementById("App")); |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'
| // This systemd runs iptables-restore on boot: | |
| [Unit] | |
| Description=Packet Filtering Framework | |
| DefaultDependencies=no | |
| After=systemd-sysctl.service | |
| Before=sysinit.target | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/sbin/iptables-restore /opt/docker/scripts/iptables/iptables.rules |
| #!/bin/bash | |
| usage () | |
| { | |
| cat <<UsageHERE | |
| boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host | |
| Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT | |
| or boot2docker-fwd -d RULE_NAME | |
| or boot2docker-fwd -l | |
| or boot2docker-fwd -A |