Skip to content

Instantly share code, notes, and snippets.

View StrangerPings's full-sized avatar

StrangerPings

View GitHub Profile
body {
background-color: #19171c;
color: #898395 !important;
}
.th-box, .th-page-header, .margin-right-wrapper, .margin-left-wrapper, .th-box-wrapper {
background: #333333 !important;
}
.t3-footer {
@StrangerPings
StrangerPings / Contract Killer 3.md
Created July 22, 2018 18:18
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@StrangerPings
StrangerPings / README.md
Created April 19, 2018 15:17 — forked from barneycarroll/README.md
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
@StrangerPings
StrangerPings / lolrus.js
Created September 25, 2017 10:30 — forked from jeffreyiacono/lolrus.js
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
*/

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

@StrangerPings
StrangerPings / analytics.conf
Created March 9, 2017 14:02 — forked from jirutka/analytics.conf
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
#