Skip to content

Instantly share code, notes, and snippets.

View Twipped's full-sized avatar
💭
Furiously innovating

Jocelyn Badgley Twipped

💭
Furiously innovating
View GitHub Profile
@Twipped
Twipped / gist:1904002
Created February 24, 2012 21:51
Conversation in #reddit-webdesign
WordpressNoob: i'm banging my head against the wall with http referrers
chiper: make sure you're spelling it wrong
TheMoonMaster: HTTP mother fucker
wkdown: do you speak it
chiper: what?
WordpressNoob: what do you mean? referrer is the correct spelling
chiper: WordpressNoob: exactly
WordpressNoob: i'm confused
chiper: WordpressNoob: in the HTTP spec it is spelled wrong
wkdown: referer is used for some stupid reason
@Twipped
Twipped / gist:1935628
Created February 28, 2012 22:17
Primal nginx server configuration.
server {
listen 80;
server_name www.primal.dev primal.dev;
access_log /srv/www/primal.dev/log/access.log;
error_log /srv/www/primal.dev/log/error.log;
root /srv/www/primal.dev/www;
index index.html index.htm index.php;
# force www subdomain
if ($host !~* ^(www)) {
@Twipped
Twipped / animations.css
Created March 1, 2012 18:22
CSS3 Animation toolkit
.animated {
-webkit-animation: 1s ease;
-moz-animation: 1s ease;
-ms-animation: 1s ease;
-o-animation: 1s ease;
animation: 1s ease;
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-ms-animation-fill-mode: both;
-o-animation-fill-mode: both;
button {
padding-top: 14px;
padding-bottom: 14px;
padding-left: 20px;
padding-right: 20px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid rgba(0,0,0,0.4);
font: bold 14px HelveticaNeue, Helvetica, Arial, sans-serif;
.progress-bar.stripes span {
-webkit-background-size: 30px 30px;
-moz-background-size: 30px 30px;
background-size: 30px 30px;
background-image: -webkit-gradient(linear, left top, right bottom, color-stop(.25, rgba(255, 255, 255, .15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .15)), color-stop(.75, rgba(255, 255, 255, .15)), color-stop(.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
/*Shiny buble*/
.com-con .comment:after {
content: '';
position: absolute;
top: 0px;
left: 3px;
right: 3px;
border-radius: 5px;
height: 6px;
padding: 3px 0;
@Twipped
Twipped / gist:1968422
Created March 3, 2012 21:36
Primal config for LAMP virtualhost
<VirtualHost *:80>
ServerAdmin lamp@chipersoft.com
ServerName primal.lamp
ServerAlias www.primal.lamp
DocumentRoot /srv/www/primal.lamp/www/
ErrorLog /srv/www/primal.lamp/log/error.log
CustomLog /srv/www/primal.lamp/log/access.log combined
<Directory "/srv/www/primal.lamp/www">
Options Indexes FollowSymLinks
@Twipped
Twipped / gist:1968650
Created March 3, 2012 22:25
Node.js code for load testing a primal site
#!/usr/bin/env node
var request = require('request');
var rCount = 0,
iterations = 100,
i = iterations,
start = (new Date()).valueOf(),
handler = function (error, response, body) {
rCount--;
console.log('Pop '+rCount);
@Twipped
Twipped / widget
Created March 5, 2012 22:56 — forked from anonymous/widget
widget
<?php
include("conn.php");
##include("check.php");
$sql = ("SELECT * FROM inv");
$result = mysql_query($sql);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@Twipped
Twipped / gist:1982289
Created March 6, 2012 00:00 — forked from anonymous/gist:1982119
jquery trubz
(function() {
var box = $('div.box'),
w = $(window).width() / 2 - box.outerWidth() / 2;
h= $(window).height() / 2 - box.outerHeight() / 2 ;
$('button').css('position', 'absolute').on("click", function() {
box.animate({
'left': w,
'top': h
});