A mixin for writing @font-face
rules in SASS. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
Simplest scenario using default values:
{ | |
name = "Threaded"; | |
rootViewer = | |
{ | |
viewerType = "MmSplitView"; | |
orientation = "horizontal"; | |
children = | |
( | |
{ | |
viewerType = "MmBoxView"; |
/* | |
* Bookmarklet is an external script for sharing content Via wordpress | |
* It was specifically designed for csskarma.com, but feel free to nab it. | |
* | |
* Bookmarklet content ( NOTE: change the URL path ): | |
* | |
* javascript:(function ()%7Bvar jsCode %3D document.createElement(%27script%27)%3BjsCode.setAttribute(%27src%27, %27https://csskarma.com/js/bookmarklet.js%27)%3Bdocument.body.appendChild(jsCode)%3B %7D())%3B | |
* | |
*/ |
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
[media-local-secret] | |
type = crypt | |
remote = secret/media | |
filename_encryption = standard | |
password = | |
password2 = | |
[media-remote-secret] | |
type = crypt | |
remote = gdrive:path/to/media |
Here's the file structure I use, and the script "kinda sorta" assumes a similar hierarchy; i.e. with the git root one level above the web root.
ProjectName/Repo/.git/
/public/
To start out, just create the Repo
directory in your project directory. The Repo
directory should be empty when you run the script. Then cd ProjectName/Repo
, and run the wp-up.sh
script, or maybe just copy the pieces that work for you.
I should note that I keep wp-config.php
one level above the web root. If that's not your thing, just remove (or skip) the line that reads mv ./public/wp-config-sample.php ./wp-config.php
.
#!/bin/bash | |
# Must run this as sudo. How to make sure of that?? | |
if [ "$EUID" -ne 0 ] | |
then | |
# Turn off history expansion to make it easier to echo exlaimation points | |
set +H | |
printf "%s\n" "Error: Monit installation and setup must be run as root. Type 'sudo !!' at the prompt, enter your password, in order to try again." | |
// Amazon pages seem to intermittently have jQuery loaded. | |
if (!window.jQuery) { | |
var jqlib = document.createElement('script'); | |
jqlib.setAttribute('type', 'text/javascript'); | |
jqlib.setAttribute('src','//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'); | |
document.head.appendChild(jqlib); | |
} | |
// Make sure jQuery before executing. | |
function defer(method) { |
Snippet: [[SnippetName]] | |
Chunk: [[$ChunkName]] | |
System Setting: [[++SettingName]] | |
TV: [[*fieldName/TvName]] | |
Link tag: [[~PageId? ¶mName=`value`]] | |
Placeholder: [[+PlaceholderName]] | |
<?php |
// What if we wanted to reverse the calculations to align with pre-defined breakpoints? | |
// You must start mobile-first. | |
// Maximum cropable area will be the size of the largest change between breakpoints. | |
// 1 - 768/992 = 22.6% <-- Winner! We may have to crop ~23% of the image width before snapping to the next size. | |
// 1 - 992/1200 = 17.3% | |
.img{ | |
display:none; // $screen-xs-min | |
height: auto; // Again, this should be constant on all sizes. The opposite of the previous method. |