Skip to content

Instantly share code, notes, and snippets.

@stympy
stympy / generate_archives.rb
Created May 23, 2011 13:05
Archive generator plugin for jekyll
# Jekyll archive page generator with pagination.
#
# Based on the category generator from
# http://recursive-design.com/projects/jekyll-plugins/,
# which is copyright (c) 2010 Dave Perrett,
# http://recursive-design.com/ and is licensed under the MIT
# license (http://www.opensource.org/licenses/mit-license.php), and
# on the pagination code from Jekyll itself.
#
# This code is copyright (c) 2011 Benjamin Curtis, and is licensed
@farinspace
farinspace / bbpress-hooks.php
Created November 17, 2011 07:53
Generate a list of hooks and filters for bbpress 2.0.1
<?php
// place and run in ./plugins/bbpress/bbp-themes
$dirs = array( './bbp-twentyten', './bbp-twentyten/bbpress' );
$actions = array();
$filters = array();
@ocean90
ocean90 / plugin.php
Created February 2, 2012 12:25
Remove gravatar from the WordPress Toolbar
<?php
/*
* Entfernt das Gravatar aus der Toolbar.
* @link: http://talkpress.de/artikel/wordpress-admin-bar-datenkrake-missbrauch
*/
/* < PHP 5.3 */
function ds_add_hide_avatar_filter() {
add_filter( 'pre_option_show_avatars', '__return_zero' );
}
@joshkersey
joshkersey / wordpress_setup.sh
Created May 15, 2012 17:25
WordPress setup Bash script
#!/bin/bash
# Installation script for a Wordpress 3.0 website on Ubuntu 10.04
#
# Josh Kersey
# Created: May 15, 2012
# Last Update: June 13, 2012
# get setup parameters
echo "apache vhost name (one word):"
@fideloper
fideloper / vhost.py
Last active June 17, 2024 11:58
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
@cobyism
cobyism / gh-pages-deploy.md
Last active July 18, 2024 05:22
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@norcross
norcross / width-adjust-functions.js
Created July 27, 2013 04:18
run various JS stuff on widths
//********************************************************
// run size checks
//********************************************************
function between(x, min, max) {
return x >= min && x <= max;
}
//********************************************************
// now start the engine
@rjmoggach
rjmoggach / responsive-margins.less
Last active August 30, 2017 00:47
Responsive Margin & Padding Shortcuts for Twitter Bootstrap Using LESS CSS
//
// Responsive Margin & Padding Shortcuts for Twitter Bootstrap 3.0
// ---------------------------------------------------------------
// This is an addition to Twitter Bootstrap that allows additional margin and padding shortcuts
// for enhanced layout control purposes. It should be included after the bootstrap.less
// import statement or precompiled as you see fit. It differs from bootstrap standards in
// that for any given screen size it predetermines the margin/padding size. All you have to
// do is specify the size you want xs,sm,md,lg, or xl. The exception is for items that you
// want to be centered using auto left/right margins. This can be device responsive by
// specifying mc-xs, mc-sm, mc-md, or mc-lg depending on when you want that behavior.
@conor-egan
conor-egan / Responsive fixed background image
Last active January 3, 2016 21:59
Responsive fixed background image
<Body>
<img src ="http://conoregan.com/wp-content/uploads/2014/01/2013-12-04-08.50.18.jpg" class="background">
<div class="wrapper">
<p>Page content</p>
</div>
</body>
//CSS:
.wrapper{
@seebk
seebk / rsync_backup.py
Last active December 11, 2023 16:34
Python rsync backup script
#!/usr/bin/python3
#######################################################
# Python rsync Backup script
# Sebastian Kraft, 24.06.2013
#
#######################################################
#-----------------------------------------------------
# Config