Skip to content

Instantly share code, notes, and snippets.

View wjn's full-sized avatar
Learning always

Will Nielsen wjn

Learning always
View GitHub Profile
@wjn
wjn / php.ini
Created April 18, 2012 01:26 — forked from bzerangue/php.ini
PHP.ini for Mac OS X Lion (running Litespeed)
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; If running Litespeed on Mac OS, the php.ini file should be placed in the /usr/local/lsws/lsphp5/lib directory.
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
@wjn
wjn / convert-number-to-word.rb
Created July 22, 2012 01:17 — forked from bzerangue/convert-number-to-word.rb
Convert Number to Word - Sass Function
require 'sass'
## install Linguistics gem, sudo install gem linguistics
require 'linguistics'
Linguistics::use( :en ) # extends Array, String, and Numeric
## this is the linguistics gem,
## instructions on how to use, http://deveiate.org/projects/Linguistics/wiki/English
## 5.en.numwords would output 'five'
@wjn
wjn / gist:3381207
Created August 17, 2012 18:07
Set permissions for only files
find /path/to/webroot/ -type f -exec chmod 644 {} \;
@wjn
wjn / gist:3381221
Created August 17, 2012 18:08
Set permissions for directories only
find /path/to/webroot/ -type d -exec chmod 755 {} ;
@wjn
wjn / avahi.sh
Created August 29, 2012 01:24
/ffp/start/avahi.sh
#!/ffp/bin/sh
# PROVIDE: avahi
# REQUIRE: SERVERS
. /ffp/etc/ffp.subr
name="avahi"
command="/ffp/sbin/avahi-daemon"
avahi_daemon_flags="-D -s"
@wjn
wjn / smb.service
Created August 29, 2012 01:25
/ffp/etc/avahi/services/smb.service
<?xml version="1.0" standalone="no"?><!--*-nxml-*-->
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
6) Create /ffp/etc/avahi/services/http.service
<?xml version="1.0" standalone="no"?><!--*-nxml-*-->
@wjn
wjn / device-info.service
Created August 29, 2012 01:26
/ffp/etc/avahi/services/device-info.service
<?xml version="1.0" standalone="no"?><!--*-nxml-*-->
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=RackMac</txt-record>
</service>
</service-group>
@wjn
wjn / gist:4514166
Created January 11, 2013 21:40
Symphony 2.3.1 .htaccess file
### Symphony 2.3.x ###
Options +FollowSymlinks -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
### SECURITY - Protect crucial files
RewriteRule ^manifest/(.*)$ - [F]
@wjn
wjn / gist:5560130
Created May 11, 2013 14:38
IE Conditional Comments
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
<![endif]-->
<!--[if IE 8]>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
<xsl:import href="get-schedule.xsl" />
<!--
Name: XSLT Calendar