Skip to content

Instantly share code, notes, and snippets.

<?php
// resize an image by the width
$image->resize($width)->url();
// resize by width and height. The bigger one will be downscaled
$image->resize($width, $height)->url();
// adjust the jpeg compression
$image->resize($width, $height, $quality)->url();
@lukasbestle
lukasbestle / search.php
Created November 5, 2015 12:29
Kirby $pages->search() that searches for full matches only
<?php
/**
* Fork of the native $pages->search() method
* Only searches for full matches
*/
function search($collection, $query, $params = array()) {
if(is_string($params)) {
$params = array('fields' => str::split($params, '|'));
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "github"]
url = GITHUB REMOTE REPO URL HERE
fetch = +refs/heads/*:refs/remotes/github/*
@kylephillips
kylephillips / favorites-display.php
Last active October 14, 2022 19:33
Using the Favorites get_user_favorites() function to display favorited post data in a custom format
<?php
// Method 1: simple foreach loop
$favorites = get_user_favorites();
if ( isset($favorites) && !empty($favorites) ) :
foreach ( $favorites as $favorite ) :
// You'll have access to the post ID in this foreach loop, so you can use WP functions like get_the_title($favorite);
endforeach;
endif;
@majorgreys
majorgreys / README.md
Last active March 18, 2019 19:29
ITF Spring 2015 Databases Skills Share

Contained here are the instructions for getting your laptop set up for databases skills share as well as my presentation.

@bobbygrace
bobbygrace / trello-css-guide.md
Last active September 27, 2025 06:29
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

anonymous
anonymous / A-Simple-CSS-Tooltip.markdown
Created November 24, 2014 03:43
A Simple CSS Tooltip
@maxfenton
maxfenton / .aliases
Last active May 1, 2024 20:01
dotfiles for oh-my-zsh + MacOS
alias zshconfig="subl $HOME/.zshrc"
alias ohmyzsh="subl $HOME/.oh-my-zsh"
alias zshrc="source $HOME/.zshrc"
alias reload!="source $HOME/.zshrc"
####### UPDATES
alias brewupdate="brew upgrade; brew update; brew doctor; brew cleanup;"
alias npmupdate="npm install -g npm@latest"
alias yarnupdate="yarn global upgrade"
@maxfenton
maxfenton / stylebot.fastmail.com.css
Last active August 29, 2015 14:08
Stylebot: Fastmail.com
span.name span {
font-weight: normal;
}
.unread span.name span {
font-weight: bold;
}
.is-unread span.v-MailboxItem-name span {
font-weight: bold;