Skip to content

Instantly share code, notes, and snippets.

View nicinabox's full-sized avatar

Nic Haynes nicinabox

View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 25, 2024 13:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mdp
mdp / README.md
Last active December 14, 2015 14:29

Keep and SSH tunnel up and running on OSX

This is my trick to keep a tunnel running on an OSX host. It's setup so that a network state change will trigger the connection. In practice I've found that it's actually very reliable. Certainly beats starting them by hand.

Notes

  • This uses a 'tunnel' user on your remote host. Because we need to start the tunnel with a passwordless ssh key, it's safer to use a key that just used for this purpose.
  • The remote tunnel user should not have priviledges to login. You only need them to be able to forward ports, shell login is not needed to do this.
@nicinabox
nicinabox / archive.sh
Last active December 14, 2015 08:48
Archive a site
wget --mirror -p --html-extension --convert-links -e robots=off -P . SITEURL
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 25, 2024 18:47
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nicinabox
nicinabox / style.scss
Last active October 3, 2015 15:58
Center UL
ul {
position: relative;
float: left;
left: 50%;
li {
position: relative;
float: left;
left: -50%;
}
}
@kevinold
kevinold / application_helper.rb
Created March 24, 2012 23:12 — forked from sjungling/application_helper.rb
Zurb Foundation Pagination styles with WillPaginate 3.x on Rails 3.2.x
#
# Concept from https://gist.github.com/1205828
#
module ApplicationHelper
class FoundationLinkRenderer < ::WillPaginate::ActionView::LinkRenderer
protected
def html_container(html)
tag(:ul, html, container_attributes)
end
@DAddYE
DAddYE / hack.sh
Created March 19, 2012 11:31
OSX For Hackers
#!/bin/sh
##
# This is a script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run in interactive mode with:
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)"
#
# or run it without prompt questions:
@mariszin
mariszin / foundation_paginate.rb
Last active September 30, 2015 04:17
Make will_paginate generate markup for Zurb Foundation
# NOTE - I do not support this code anymore.
# You should use plambjet version @ https://gist.github.com/pjambet/5229322
#
# Based on https://gist.github.com/1182136 and https://gist.github.com/1586384
# Make the will_paginate generate markup for Zurb Foundation
# Put this in config/initializers/foundation_paginate.rb
module WillPaginate
module ViewHelpers
class LinkRenderer < LinkRendererBase
protected