Skip to content

Instantly share code, notes, and snippets.

View misfist's full-sized avatar

Pea Lutz misfist

View GitHub Profile
@timkelty
timkelty / config.rb
Created January 11, 2012 15:28
Compass config.rb
# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded
@evansolomon
evansolomon / gist:2274120
Created April 1, 2012 09:36
nginx WordPress multisite config
server {
listen 80 default_server;
server_name domain.com *.domain.com;
root /srv/www/domain.com/public;
access_log /srv/www/domain.com/log/access.log;
error_log /srv/www/domain.com/log/error.log;
location / {
index index.php;
@christianhanvey
christianhanvey / modx-snippets.php
Last active June 14, 2023 13:02
Useful snippets for MODX Revo
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
@nciske
nciske / co-authors-list.php
Last active April 6, 2019 07:43
List just co-authors with thumbnail
<?php
$args = array( 'post_type' => 'guest-author', 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC' );
$guest_authors = get_posts( $args );
foreach( $guest_authors as $ga ){
echo '<div class="contributor">';
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 11, 2024 10:06
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@danielbachhuber
danielbachhuber / gist:7126249
Last active December 21, 2021 15:46
Include posts from authors in the search results where either their display name or user login matches the query string
<?php
/**
* Include posts from authors in the search results where
* either their display name or user login matches the query string
*
* @author danielbachhuber
*/
add_filter( 'posts_search', 'db_filter_authors_search' );
function db_filter_authors_search( $posts_search ) {
@Santel
Santel / functions.php
Last active January 16, 2021 16:49
Remove first image from WordPress post
//* Remove first image from single post
function remove_first_image ($content) {
if (!is_page() && !is_feed() && !is_home()){
$content = preg_replace("/<img[^>]+\>/i", "", $content, 1);
} return $content;
}
add_filter('the_content', 'remove_first_image');
@matthewpizza
matthewpizza / install-composer.sh
Created February 13, 2014 03:55
Install Composer on Webfaction
cd $HOME
ln -s `which php54` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php54
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile

How to get Composer running on SiteGround shared

  1. Download getcomposer.org/composer.phar to your account's home directory — /home/username.
  2. Edit .bashrc file in same directory by adding alias composer='/usr/local/php56/bin/php-cli ~/composer.phar' line. Update php56 part to current relevant version, if necessary.
  3. Restart SSH session or run source ~/.bashrc to reload config.
  4. Use composer command!