Skip to content

Instantly share code, notes, and snippets.

@alexharris
alexharris / wp-tailwind-notes
Created January 10, 2020 22:49
Notes on how to make a Wordpress theme with Tailwind CSS
1. First, download a theme from https://underscores.me/
2. Follow this tutorial: https://paulund.co.uk/using-tailwind-css-in-your-wordpress-theme
3. Replace the contents of webpack.mix.js with the following:
```
const mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
mix.postCss('./theme-style.css', './style.css',
tailwindcss('./tailwind.config.js')
@alexharris
alexharris / main.js
Created November 12, 2019 00:52
Import Vue Palette Builder
import PaletteBuilder from 'vue-palette-builder' // import the component
export default {
components: {
PaletteBuilder // register the component
},
data() {
return {
palette: [] // create a variable called "palette" to hold the output
}
$subdomains = ['atlanta', 'berkeley', 'columbus'];
foreach ($subdomains as $subdomain) {
if (isset($_ENV['PANTHEON_ENVIRONMENT']) &&
($_SERVER['HTTP_HOST'] == $subdomain . '.yoursite.com') &&
// Check if Drupal or WordPress is running via command line
(php_sapi_name() != "cli")) {
$newurl = 'http://www.yoursite.com/' . $subdomain . '/'. $_SERVER['REQUEST_URI'];
header('HTTP/1.0 301 Moved Permanently');
@alexharris
alexharris / links_list.js
Last active August 29, 2015 14:08
publications.js
function randomQuestion(){
question = mainQuestionArray[Math.floor(Math.random()*mainQuestionArray.length)];
return question;
}
function questionPopover(){
$('.desktop-question').popover({
placement: 'bottom',
trigger: 'click',
players = $('.players').children();
currentPlayer = players[offset/100];
currentPlayer.classList.add('current-player');
> rake generate
## Generating Site with Jekyll
identical source/stylesheets/boilerplate.css
identical source/stylesheets/mixins.css
error sass/sidr.scss (Line 13: Undefined mixin 'box-shadow'.)
identical source/stylesheets/sidr.css
error sass/structure.scss (Line 22: Undefined variable: "$darkBlue".)
identical source/stylesheets/structure.css
identical source/stylesheets/styles.css
error sass/theme.scss (Line 2: Undefined variable: "$white".)
BitlyError in TweetsController#show
INVALID_URI - '500'
Rails.root: /Users/alexharris/Sites/twhatever
Application Trace | Framework Trace | Full Trace
app/controllers/tweets_controller.rb:38:in `show'
Request
Parameters: