Skip to content

Instantly share code, notes, and snippets.

View johanoloflindberg's full-sized avatar
💭
Ready to work 😃

WEBBAB johanoloflindberg

💭
Ready to work 😃
View GitHub Profile
@kirbysayshi
kirbysayshi / meyerish.css
Created June 14, 2011 19:12
Various css resets in one location
/*********** Resets */
div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6,
pre, form, fieldset, input, textarea, p, blockquote, th, td { margin: 0; padding: 0; }
fieldset, img { border: 0; }
table { border-collapse: collapse; border-spacing: 0; }
ol, ul { list-style: none; }
address, caption, cite, code, dfn, em, strong, th, var { font-weight: normal; font-style: normal; }
caption, th { text-align: left; }
h1, h2, h3, h4, h5, h6 { font-weight: normal; font-size: 100%;}
q:before, q:after { content: ''; }
@jakebellacera
jakebellacera / http-auth-basic.md
Created January 9, 2012 21:18
How to secure a folder with Basic HTTP Authentication

Basic HTTP Authentication is when a user is required to log in to access a directory. This isn't meant to be secure by any means, but it's useful for locking out a majority of users from accessing a folder (e.g. staging a website).

To start, you must add this into your .htaccess:

AuthUserFile "/var/www/full/path/to/your/folder/.htpasswd"
AuthName "Message to go on user's login screen"
AuthType Basic
Allow from all
Require valid-user

Options +Indexes

@eltioska
eltioska / HTML starter.html
Last active July 16, 2020 00:44
HTML: Starting Template #html
<!doctype html>
<head>
<meta charset=utf-8>
<title></title>
</head>
<body>
<script src="ttps://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</body>
</html>
@MrChuffmanSnippets
MrChuffmanSnippets / index.html
Created March 15, 2012 10:05
HTML5: Blank Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
@jeffsebring
jeffsebring / local-config.php
Created April 2, 2012 03:25
WordPress Pro Config
<?php
# Turn on Caching
#define('WP_CACHE', true);
# Set the Memory Limit
#define('WP_MEMORY_LIMIT', '64M');
# Development Table prefix
#$table_prefix = 'dev_';
@bgallagh3r
bgallagh3r / wp.sh
Last active March 23, 2025 19:40
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
self.metrics = function () {
var tempUpdater = setInterval(function () {
$.get('/php/thermistor.php', function (data) {
$('#temp').html(data + '<span>&deg; F</span>');
});
}, 2000);
}
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@jacksonfdam
jacksonfdam / gist:3000306
Created June 26, 2012 23:59
FTP file upload example
<?php
// FTP access parameters:
$host = 'ftp.example.org';
$usr = 'example_user';
$pwd = 'example_password';
// file to upload:
$local_file = './example.txt';
$ftp_path = '/data/example.txt';
@lilyball
lilyball / gist:3373169
Created August 16, 2012 20:04
objc_cast
template<typename T> inline T* objc_cast(id from) {
if ([from isKindOfClass:[T class]]) {
return static_cast<T*>(from);
}
return nil;
}