Skip to content

Instantly share code, notes, and snippets.

@8ig8
8ig8 / setremotekey
Created November 25, 2010 03:26
Automate uploading SSH key to a remote host
#!/bin/sh
#
# Name : setremotekey
# Description : Automate uploading SSH key to a remote host
# Installation : Save this as 'setremotekey' to '/usr/local/bin/'
# and then make the file executable with 'chmod +x setremotekey'
# Usage : setremotekey username@host
# Source : http://hints.macworld.com/article.php?story=2007091814022049
# Author : See source above. Modified by bpk/lfd.
@8ig8
8ig8 / spider
Created July 13, 2011 21:01
Spider a page for broken links
wget --spider --no-parent -r -l1 -H --no-directories -erobots=off -o log.txt http://the-url.com/page/
@8ig8
8ig8 / htaccess non-www redirect
Created July 18, 2011 15:55
Force non-www URLs via .htaccess #htaccess
# Force non-www URLs via .htaccess file
# Rewrite all requests that include www (i.e. http://www.domain.com/page/)
# to non-www (i.e. http://domain.com/page/)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
@8ig8
8ig8 / hack.sh
Created March 31, 2012 15:18 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@8ig8
8ig8 / remote-upload-image.php
Created April 17, 2012 03:50
How To Locally Mirror Remote Images With WordPress
<?php
/*
How To Locally Mirror Remote Images With WordPress
Source: http://forrst.com/posts/Locally_Mirror_Remote_Images_With_WordPress-XSE
*/
// URL of the image you want to mirror. Girl in pink underwear for instance.
$image = 'http://i.imgur.com/Hq4QA.jpg';
@8ig8
8ig8 / package.json
Last active December 12, 2015 02:59
package.json template for DocPad.
{
"name": "site-name.docpad",
"version": "0.1.0",
"description": "This is a description of the site.",
"keywords": [
"docpad"
],
"author": "bpk",
"engines": {
"node": "0.8.x",
@8ig8
8ig8 / gist:4708846
Created February 4, 2013 19:16
Language Specific Indents In Sublime Text 2 Sublime Text 2 -> Preferences -> Settings - More -> Syntax Specific - User
{
"tab_size": 2,
"translate_tabs_to_spaces": true
}

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@8ig8
8ig8 / HTML.php
Created August 18, 2013 02:09 — forked from tamagokun/HTML.php
<?php
class HTML
{
public static function __callStatic($tag,$args)
{
$options = array_shift($args);
$content = ($args)? array_shift($args) : "";
return self::element($tag,$options,$content);
}