Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

John Lafitte jlafitte

🎯
Focusing
Block or report user

Report or block jlafitte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View url-encode.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>
<!-- ISO-8859-1 based URL-encoding demo
Written by Mike J. Brown, mike@skew.org.
Updated 2015-10-24 (to update the license).
License: CC0 <https://creativecommons.org/publicdomain/zero/1.0/deed.en>
@jlafitte
jlafitte / onion-skin.js
Last active Dec 6, 2018 — forked from dtex/gist:4337176
Onion skinning plugin for jQuery
View onion-skin.js
(function( $ ){
var methods = {
init : function( options ) {
return this.each(function(){
oSkin = $('<div class="onionSkin" style="width:100%;text-align:center;position:absolute;opacity:.5;display:none;" />');
oImg = $('<img src="'+options.src+'" />');
oImg.css(options.imgStyles);
View class-sassy-social-share-public.php
<?php
/**
* Contains functions responsible for functionality at front-end of website
*
* @since 1.0.0
*
*/
/**
@jlafitte
jlafitte / cleanmgr.bat
Last active Mar 29, 2018
Windows Server 2008 Clean Manager Enabler
View cleanmgr.bat
@echo off
echo Installing Disk Cleanup if not already installed.
if not exist %SYSTEMROOT%\System32\cleanmgr.exe (
copy /Y C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe %SYSTEMROOT%\System32\
)
if not exist %SYSTEMROOT%\System32\en-US\cleanmgr.exe.mui (
copy /Y C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui %SYSTEMROOT%\System32\en-US\
)
@jlafitte
jlafitte / .eslintrc
Last active Aug 21, 2019
Idiomatic ESLint
View .eslintrc
//Put this in your home directory... Unless you need project specific settings
{
"extends": "idiomatic",
"rules": {
"quotes": ["warn","double"],
"space-in-parens": ["warn","never"],
"array-bracket-spacing": ["warn","never"],
"computed-property-spacing": ["warn","never"],
"one-var-declaration-per-line": ["warn","initializations"],
"semi": ["error","always",{
@jlafitte
jlafitte / disk-space.asp
Created Jun 8, 2016
Get disk space in ASP
View disk-space.asp
<%
function getGB(bytes)
getGB = Fix(bytes / 1073741824)
end function
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive("C:")
response.write getGB(d.FreeSpace) & "GB free of " & getGB(d.TotalSize) & " GB"
%>
@jlafitte
jlafitte / me.screenshot.plist
Last active Jun 19, 2018
OS X Screenshot Script
View me.screenshot.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>me.screenshot</string>
<key>ProgramArguments</key>
<array>
<string>/Users/john/scripts/screenshot.sh</string>
</array>
@jlafitte
jlafitte / sshauth.sh
Created Aug 25, 2014
Automate uploading your public ssh key to a remote system authorized keys
View sshauth.sh
#!/bin/bash
echo "-- Adds your id_rsa.pub to a remote system authorized keys --"
echo "Usage: $0 <user>@<host>"
if [ -z "$1" ]; then
echo -n "User: "
read user
echo -n "Host: "
@jlafitte
jlafitte / .bash_profile
Last active Jun 19, 2018
OSX Clean Install Procedures
View .bash_profile
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:~/scripts
export CLICOLOR=1
export LSCOLORS=hxFxBxDxCxegedabagacad
alias dir="ls -lahG"
alias ll="ls -lahG"
alias qws="python -m SimpleHTTPServer"
alias rscp='rsync -aP'
alias rsmv='rsync -aP --remove-source-files'
@jlafitte
jlafitte / xslt.clips
Created Aug 5, 2013
XSLT Clips for Coda 2
View xslt.clips
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>$archiver</key>
<string>NSKeyedArchiver</string>
<key>$objects</key>
<array>
<string>$null</string>
<dict>
You can’t perform that action at this time.