Skip to content

Instantly share code, notes, and snippets.

:shipit:
Focusing

Alison Monteiro alisonmonteiro

:shipit:
Focusing
Block or report user

Report or block alisonmonteiro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ssh-config-layout
Host name
HostName ip
User user-name
IdentityFile ~/.ssh/key.pem
View gist:5e11ffb440763d9c2ff55b960c2debf4
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
@alisonmonteiro
alisonmonteiro / Dockerfile
Created Dec 12, 2019
create docker image with ecs-cli-v2 installed
View Dockerfile
FROM docker:19.03
RUN apk add --update \
bash \
git \
openssh \
python \
python-dev \
py-pip \
build-base \
@alisonmonteiro
alisonmonteiro / form.js
Last active May 29, 2018
Wordpress Ajax Example
View form.js
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) // ...
View defered-styles.html
<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;
View unit-test-template.js
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?');
View svg-boxshadow-filter
<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"/>
View pagination-posts-limit-wp.php
<?php
add_action('pre_get_posts', function() {
if (is_category('my-category')
$query->set('posts_per_page', 4);
});
You can’t perform that action at this time.