Skip to content

Instantly share code, notes, and snippets.

@Rarst
Rarst / griddle.php
Last active August 24, 2016 20:53
Responsive grid layout backgrounds for Bootstrap.
<?php
if ( isset( $_GET['grid'] ) ) {
add_action( 'wp_print_styles', function () { ?>
<style type="text/css">
@media (min-width: 768px) {
body {
background: url("http://griddle.it/720px-12-30px") repeat-y center top !important;
}
@myasseen
myasseen / bootstrap-sass-mixin-cheatsheet.scss
Last active June 20, 2017 16:07 — forked from anthonyholmes/bootstrap-sass-mixin-cheatsheet.scss
Bootstrap SCSS Mixins and Modifications
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@ryanscherler
ryanscherler / php-openssl.md
Last active August 16, 2018 20:06
Use Homebrew PHP with OpenSSL instead of SecureTransport
@cramdesign
cramdesign / gallery-style.css
Created April 16, 2014 23:50
WordPress 3.9 ships with the ability to add HTML5 support for galleries which will now use figure and figcaption to display images. This is a huge change for the better! Bonus: br tag used for clearing rows has been cleaned out as well. While all of this is good news for more semantic markup, one might now be left wondering how to style the new …
@itsdavidmorgan
itsdavidmorgan / gutenberg.css
Last active January 5, 2020 18:59
Back-end Styles For Gutenberg Content Editor
/************************************************
Gutenberg Editor
************************************************/
.block-editor .wp-block {
max-width: 760px;
}
.block-editor .wp-block[data-align="wide"] {
max-width: 920px;
}
@ethicka
ethicka / sage9-deploybot.md
Last active May 4, 2020 07:24
How to build and deploy a Roots / Sage 9 WordPress theme on Deploybot

Deploying Roots Sage 9 via Deploybot

Sage 9 is the latest and greatest from Roots, but the build process is much more complicated than Sage 8 (i.e. gulp --production and profit). The following took me quite a bit of time to figure out, but is probably not comprehensive. Please comment if you need clarity. I hope it saves you some time!

Build the Container

Deploybot allows you to create your own containers. Go to Settings > Containers > Create a container. Based off the Ubuntu 16.04 container add the following build commands and save as Sage 9:

@ethicka
ethicka / pdf-to-jpg.sh
Last active October 9, 2020 14:33
Convert a folder of PDFs to JPGs
#!/bin/bash
# Dependencies: vips
# Homebrew: brew install vips
for file in *.pdf
do
# Run vips pdfload for options
# You could add --page=1 to get the second page (from 0) or --dpi=300, etc. to get different quality images
# The variable gets the filename without the extension
vips pdfload ${file%.*}.pdf ${file%.*}.jpg
done
@yorkxin
yorkxin / README.md
Last active October 27, 2020 12:17
Amazon S3 Redirect Rules Generator

Amazon S3 Redirect Rules Generator

A Ruby script to generate simple Amazon S3 Redirection Rules XML file.

Update: There is an app for that now! Use Amazon S3 Redirector (Web app) and you can generate the XML without any knowledge about Ruby. Thanks to @rainforestapp. BTW, It's open source too.

Dependencies

  • Nokogiri
@wycks
wycks / htaccess cache and stuff
Last active March 26, 2022 20:48
Boilerplate .htaccess from Paul Irish with WordPress added
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@jaywilliams
jaywilliams / deploy.rb
Last active July 11, 2022 00:32 — forked from el-rotny/deploy.rb
set :repo_url, 'git@github.com:Design-Collective/some-repo.git'
set :application, 'the-app-name.com'
set :theme_name, 'sage'
# Branch options
# Prompts for the branch name (defaults to current branch)
#ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp }
# Hardcodes branch to always be master
# This could be overridden in a stage config file