Skip to content

Instantly share code, notes, and snippets.

View brstp's full-sized avatar

Stefan Pettersson brstp

  • Stockholm, Sweden
View GitHub Profile
@brstp
brstp / gist:5051565
Created February 27, 2013 20:47
Appropå det registrerade varumärket Smarter SEO.
Detailed information 2012/08726
Mark:
SMARTER SEO
Holder Namne:
LAURI & PARTNER AB, Champinjonvägen 3, 725 91 Västerås, Sverige
Representative:
@brstp
brstp / gist:4951517
Last active December 13, 2015 17:58
Still problem with special characters in filenames when Paperclip let´'s identify validate the file. Platform dependent. In my case, Win7. With reference to https://github.com/thoughtbot/paperclip/pull/1154 2013-02-14 10:20 CET
###########################################
# A. DEVELOPMENT ENVIRONMENT
# Win7/64
-------------------------------------------
# Excerpt from Gemfile.lock
GIT
remote: git://github.com/thoughtbot/paperclip.git
revision: e421bc1b0d5806f53be8a664c5f3c70c2e285e7e
@brstp
brstp / 404.asp
Created January 10, 2012 15:02
Custom error page for IIS to redirect removed pages. F&S/Tankbar. Installation instruction on: http://evolvedcode.net/content/code_smart404/
<%
'Redirection from old Friskis&Svettis sites to pages on new sites
'Version R2A
'Script adapted by stefan.pettersson@lumano.se 2004-01-07
'Script adapted by stefan.pettersson@lumano.se 2012-01-10
'Script patched to match substring source url (to match each F&S club file archive instead of individual files). 2012-01-23
'This ASP script originally lived at http://evolvedcode.net/
'For the latest version of this code please see;
@brstp
brstp / not-found.asp
Created December 13, 2011 10:01
Custom error page for IIS to redirect to redirect dispatcher
<%
option explicit
Response.Buffer = true
dim sServerName
dim sURL
sServerName = lcase(Request.ServerVariables("SERVER_NAME"))
select case sServerName
case "web.friskissvettis.se": sURL = "http://omdirigera.se/404.html"
@brstp
brstp / 404.asp
Created June 14, 2011 08:19
A custom 404 error page for IIS with redirection of changed urls. http://www.lumano.se/Artiklar/OmdirigeraNarDuFlyttarSidan
<%
option explicit
Response.Buffer = true
dim sServerName
dim sURL
sServerName = lcase(Request.ServerVariables("SERVER_NAME"))
select case sServerName
case "www.oldgreenplus.com": sURL = "http://www.new-site.com/template/Page____8466.aspx"
case "www.oldgreen.com": sURL = "http://www.new-site.com/template/Page____8466.aspx"
@brstp
brstp / validate.html
Created April 21, 2011 13:18
Part of html file that triggers client side validation.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Ny evenemangsannons | </title>
<meta name="csrf-param" content="authenticity_token"/>
<meta name="csrf-token" content="+LsUr+NdHyOZ8XA+A8oMYBa5EYq4+c+Fy2RYZA2O/x4="/>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="whatever.css" />
<title>Kalender</title>
</head>
<body>
<table>
<caption>Kalender för mars 2011</caption>