Fig - Autocomplete for the shell
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
| # to use, simply set the variables on lines 14-20 and run python main.py | |
| from pathlib import Path | |
| from tqdm import tqdm | |
| import boto3 | |
| import os | |
| import paramiko | |
| import logging | |
| logger = logging.getLogger(__name__) |
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
| <?php | |
| # Script taken from https://dev-notes.eu/2017/01/convert-acf-fields-registered-by-php-to-importable-json-format/. Instructions for usage can be found there. | |
| $groups = acf_get_local_field_groups(); | |
| $json = []; | |
| foreach ($groups as $group) { | |
| // Fetch the fields for the given group key | |
| $fields = acf_get_fields($group['key']); |
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
| <div class="privacy-policy"> | |
| <h1>Privacy Policy</h1> | |
| <section id="privacy-information-we-collect"> | |
| <h3>What information do we collect?</h3> | |
| <p>We collect information from you when you register on our site, place an order, subscribe to our newsletter, respond to a survey or fill out a form.</p> | |
| <p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address, mailing address, phone number, credit card information or social security number. You may, however, visit our site anonymously. | |
| Google, as a third party vendor, uses cookies to serve ads on your site. Google's use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p> | |
| </section> |
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
| apiVersion: batch/v1 | |
| kind: Job | |
| metadata: | |
| name: debug-job | |
| labels: | |
| app.kubernetes.io/name: debug-job | |
| spec: | |
| template: | |
| metadata: | |
| labels: |
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
| function ec2terminate() { | |
| DNS_NAME=$1 | |
| echo "finding EC2 instance with DNS name $DNS_NAME" | |
| EC2_INSTANCE_ID=$(aws ec2 describe-instances | jq --raw-output '.Reservations[].Instances[] | select(.PrivateDnsName == "'"$DNS_NAME"'") | .InstanceId') | |
| echo "terminating EC2 instance with ID $EC2_INSTANCE_ID" | |
| aws ec2 terminate-instances --instance-ids $EC2_INSTANCE_ID |
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
| // THIS WORKS (Code is properly split into two chunks) | |
| if (IS_TABLET) { | |
| require.ensure(['./Checkout.Tablet.react.js'], function (require) { | |
| TabletOrPhone = require('./Checkout.Tablet.react.js'); | |
| }); | |
| } else { | |
| require.ensure(['./Checkout.Mobile.react.js'], function (require) { | |
| TabletOrPhone = require('./Checkout.Mobile.react.js'); | |
| }); | |
| } |