Skip to content

Instantly share code, notes, and snippets.

View tweet-data
fetch('https://www.tweetjs.com/API.aspx', {
body: JSON.stringify({
Action: 'ListTweetsOnUserTimeline',
ScreenName: 'urre',
}),
method: 'POST',
})
.then((r) => r.json())
.then((data) => {
console.log(data)
@urre
urre / custom-feed.php
Created Dec 14, 2019
WordPress Custom RSS feed
View custom-feed.php
<?php
/*
Plugin Name: Custom RSS Feed for App
Description: A plugin creating a customized rssfeed
Plugin URI: https://urre.me/
Author: Urban Sandén
Author URI: https://urre.me
*/
// Add dates for rss feed
@urre
urre / config.yml
Last active Jun 28, 2019
CircleCI config for WordPress with Bedrock
View config.yml
version: 2
jobs:
build:
working_directory: ~/clone
docker:
- image: circleci/php:7.1-node-browsers
steps:
- checkout
@urre
urre / config.yml
Created Dec 7, 2018
Circle CI config for Jekyll
View config.yml
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.5.0-node
working_directory: ~/repo
steps:
- checkout
@urre
urre / example.md
Last active Aug 20, 2018
Example, Bedrock on Codeship
View example.md

1. Initial setup

  • 1.1 First setup the ENV variables under Environment
  • 1.2 Authorize the project specific Codeship ssh key on the server. (under General)

2. Setup tab

phpenv local 7.2
@urre
urre / test.sh
Created Feb 2, 2018
composer test command
View test.sh
composer test
@urre
urre / setup.sh
Created Feb 2, 2018
codeship setup command
View setup.sh
phpenv local 7.2
composer install --prefer-source --no-interaction
View output.sh
FILE: ...rojects/myproject/myfile.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
34 | ERROR | [x] Expected 1 spaces before closing bracket; 0 found
36 | ERROR | All output should be run through an escaping function
| | (see the Security sections in the WordPress Developer
| | Handbooks), found '$image_src'.
90 | ERROR | [x] String "Create a Configuration File" does not require
| double quotes; use single quotes instead
View gist:e3f4daa0b3cda15ba4fc8e9393c6d205
"scripts": {
"post-install-cmd": "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"post-update-cmd" : "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"test": [
"phpcs --report=full --colors -p --standard=web/app/themes/mytheme/codesniffer-ruleset.xml --ignore=*/vendor/*,*/node_modules/* web/app/themes/mytheme/ --extensions=php"
]
}
View gist:e06e8113d3858842abe3135f9dc85f1e
"scripts": {
"post-install-cmd": "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"post-update-cmd" : "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs"
}