This file contains 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 | |
add_action('pre_get_posts', function() { | |
if (is_category('my-category') | |
$query->set('posts_per_page', 4); | |
}); |
This file contains 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
<defs> | |
<filter id="dropshadow" height="130%"> | |
<feGaussianBlur in="SourceAlpha" stdDeviation="15"/> | |
<feOffset dx="1" dy="20" result="offsetblur"/> | |
<feComponentTransfer> | |
<feFuncA type="linear" slope="0.1"/> | |
</feComponentTransfer> | |
<feMerge> | |
<feMergeNode/> | |
<feMergeNode in="SourceGraphic"/> |
This file contains 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 test from 'tape'; | |
// answer these questions: | |
test('What component aspect are you testing?', assert => { | |
const actual = 'What is the actual output?'; | |
const expected = 'What is the expected output?'; | |
assert.equal(actual, expected, | |
'What should the feature do?'); |
This file contains 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
<noscript id="deferred-styles"> | |
<link rel="stylesheet" href="style.css"/> | |
</noscript> | |
<script> | |
function loadDeferredStyles() { | |
var addStylesNode = document.getElementById('deferred-styles'); | |
var replacement = document.createElement('div'); | |
replacement.innerHTML = addStylesNode.textContent; |
This file contains 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
const url = '/wp-admin/admin-ajax.php' | |
const data = { | |
action: 'custom_action', | |
token: document.querySelector('[name="token"]').value, | |
name: document.querySelector('[name="name"]').value | |
} | |
customRequest(url, data) // ... |
This file contains 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 docker:19.03 | |
RUN apk add --update \ | |
bash \ | |
git \ | |
openssh \ | |
python \ | |
python-dev \ | |
py-pip \ | |
build-base \ |
This file contains 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
ecs-cli configure profile --profile-name {PROFILE_NAME} --access-key {AWS_ACCESS_KEY} --secret-key {AWS_SECRET_KEY} | |
ecs-cli configure --cluster {CLUSTER_NAME} --default-launch-type EC2 --region us-east-1 --config-name {PROFILE_NAME} | |
ecs-cli up --keypair {KEY_PAIR_NAME} --instance-role {INSTANCE_ROLE} --size 1 --instance-type t2.medium --vpc vp-c{VPC_ID} --subnets subnet-{SUBNET_ID} | |
ecs-cli compose -f docker-compose.ecs.yml service up |
This file contains 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
Host name | |
HostName ip | |
User user-name | |
IdentityFile ~/.ssh/key.pem |
This file contains 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
sudo apt-get remove docker docker-engine docker.io containerd runc | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common |
This file contains 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
ssh-add -l | |
ssh-add -D | |
ssh-add ~/.ssh/my-github-key | |
ssh -T git@github.com |