This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { TouchableHighlight } from "react-native"; | |
| export class Parent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| value: null | |
| }; | |
| // Remember to bind methods. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { TouchableHighlight } from "react-native"; | |
| export class Parent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| value: null | |
| }; | |
| // Remember to bind methods. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'nprogress/nprogress.css' | |
| import NProgress from 'nprogress' | |
| import axios from 'axios' | |
| const calculatePercentage = (loaded, total) => (Math.floor(loaded * 1.0) / total) | |
| const setupUpdateProgress = () => { | |
| axios.defaults.onDownloadProgress = e => { | |
| const percentage = calculatePercentage(e.loaded, e.total) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add this snippet to the top of your playbook. | |
| # It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
| # gwillem@gmail.com | |
| - hosts: all | |
| gather_facts: False | |
| tasks: | |
| - name: install python 2 | |
| raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from functools import partial | |
| def placeholderify(form=None, fields=None): | |
| """ | |
| A decorator for Django forms that sets a `placeholder` attribute to all | |
| fields. Each field's label is used as a placeholder. | |
| Use it like so: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .select2-container .select2-choice { | |
| height: 34px; | |
| -webkit-box-shadow: none; | |
| -moz-box-shadow: none; | |
| box-shadow: none; | |
| background-color: #fff; | |
| background-image: none; | |
| background: #fff; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //How to edit a user profile on the front end? | |
| //http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end | |
| //Forcing nickname as display_name in custom edit profile template | |
| //http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template | |
| /////// | |
| <?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' ); | |
| function custom_woocommerce_billing_fields( $fields ) { | |
| // Over-ride a single label | |
| $fields['billing_first_name']['label'] = 'Your label'; | |
| // Over-ride a single required value | |
| $fields['billing_first_name']['required'] = false; |
NewerOlder