Skip to content

Instantly share code, notes, and snippets.

@SgtPooki
SgtPooki / .htaccess
Created March 19, 2014 22:54
remove .php
# Apache Rewrite Rules
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
#RewriteLog /var/rewrite.log RewriteLogLevel 9
# Redirect to URL without extension. (remove .php)
RewriteCond %{THE_REQUEST} ^[A-Z]+\s.+\.php\sHTTP/.+
RewriteRule ^(.+)\.php $1 [R=301,L]
@SgtPooki
SgtPooki / installNode.sh
Created April 30, 2014 20:02
Script to install node and npm on a new arch linux install
sudo pacman -Syy
sudo pacman -S --noconfirm python2 wget git make gcc vim
sudo mv /usr/bin/python /usr/bin/python-BAK
sudo ln -s /usr/bin/python2 /usr/bin/python
source <(curl -s https://gist.githubusercontent.com/SgtPooki/7667376/raw/node-and-npm-in-30-seconds.sh)
@SgtPooki
SgtPooki / beep.bat
Last active August 29, 2015 14:01
Create a beep! "beep x" will beep x times, for a max of 10. x defaults to 1.
@echo off
REM loopNum defaults to 1, caps at 10.
REM see https://gist.github.com/SgtPooki/99e12f32a874aa7dd3b2
SET loopNum=1
If not "%~1"=="" (
SET loopNum=%1
)
@SgtPooki
SgtPooki / provision.sh
Created June 3, 2014 22:31
nvm / rvm provisioning script
#!/bin/bash
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git curl python-software-properties libcurl3 libcurl3-gnutls libcurl4-openssl-dev
@SgtPooki
SgtPooki / .jshintrc
Last active August 29, 2015 14:03 — forked from haschek/.jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@SgtPooki
SgtPooki / .gitconfig
Last active August 29, 2015 14:04
git config
[user]
name = Russell Dempsey
email = rdempsey@nerdery.com
[core]
autocrlf = false
editor = vim
[push]
default = current
@SgtPooki
SgtPooki / Boxstarter
Last active August 29, 2015 14:11
Boxstarter
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Set-TaskbarSmall
### development
## languages
@SgtPooki
SgtPooki / ConEmu-for-cmder.xml
Created February 21, 2015 00:14
The settings file for cmder with saved layout
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2015-02-20 18:12:53" build="140707">
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
<value name="ColorTable03" type="dword" data="00a6831a"/>
<value name="ColorTable04" type="dword" data="003403a7"/>
<value name="ColorTable05" type="dword" data="009c5689"/>
@SgtPooki
SgtPooki / recursiveBezier.js
Created April 2, 2015 15:30
Recursive Bezier function
var recursiveBezier = function recursiveBezier(pointArray, t) {
var P1;
var P2;
var inverse;
var length = pointArray.length;
if (length === 1) {
return pointArray[0];
} else {
P1 = recursiveBezier(pointArray.slice(0,length-1), t)
P2 = recursiveBezier(pointArray.slice(1), t);
@SgtPooki
SgtPooki / mcoords.js
Created April 11, 2015 05:04
Display mouse coordinates
(function() {
'use strict';
var $toolTip = $('<div/>');
$toolTip.addClass('customTooltip-rsd')
.css({
position: 'absolute',
display: 'inline-block',
'font-size': '22px',
backgroundColor: '#000',
color: '#ffffff',