Skip to content

Instantly share code, notes, and snippets.

View StrangerPings's full-sized avatar

StrangerPings

View GitHub Profile
@giordanocardillo
giordanocardillo / Install vsftpd with virtual users on Ubuntu 14.04.md
Last active November 18, 2020 19:23
Install vsftpd with virtual users on Ubuntu 14.04

With a bit of playing around I've managed to come up with a semi solution (not perfect but good enough)

using 2707974 answer and information I've gained else where I've been able to get what I need.

First you need vsftp and PAM installed

apt-get install vsftpd libpam-pwdfile apache2-utils

Edit /etc/vsftpd.conf

Here is my public file code
<?php
/**
* The public-facing functionality of the plugin.
*
* @link
* @since 1.0.0
*
* @package plugin_name
@barneycarroll
barneycarroll / README.md
Last active August 29, 2022 12:02
Lock and unlock a page's scroll position.

jquery.scrollLock.js

Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.

// Locks the page if it's currently unlocked
$.scrollLock();

// ...or vice versa
@jirutka
jirutka / analytics.conf
Created March 31, 2013 01:03
Add Google Analytics tracking code to HTML via nginx
#
# Add Google Analytics tracking code to HTML response
#
# Usage:
# set $tracking_id 'UA-12345678-9';
# include incl/analytics.conf;
#
# It needs nginx compiled with option --with-http_sub_module.
# Uses optimized GA code from: http://mathiasbynens.be/notes/async-analytics-snippet
#
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@jeffreyiacono
jeffreyiacono / lolrus.js
Created March 18, 2012 04:53
simple normalization of jquery event so offsetX / offsetY can be used cross browsers
/**
* normalizeEvent
*
* Firefox does not implement offsetX, OffsetY, so we have to detect for this an
* manually calculate it ourselves using the pageX, pageY less the event
* target's left offset and right offset
*
* If using a browser that supports offsetX, OffsetY, just return the event,
* don't need to do anything
*/
@justinwhall
justinwhall / gist:1997794
Created March 8, 2012 01:19
PHP: WordPress | breadcrumbs
function wp_bac_breadcrumb() {
//Variable (symbol >> encoded) and can be styled separately.
//Use >> for different level categories (parent >> child >> grandchild)
$delimiter = '<span class="delimiter"> &raquo; </span>';
//Use bullets for same level categories ( parent . parent )
$delimiter1 = '<span class="delimiter1"> &bull; </span>';
//text link for the 'Home' page
$main = 'Home';
//Display only the first 30 characters of the post title.