This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, cookieSessions = require('./cookie-sessions'); | |
var app = express(); | |
app.use(express.cookieParser('manny is cool')); | |
app.use(cookieSessions('sid')); | |
app.get('/', function(req, res){ | |
req.session.count = req.session.count || 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
css3-mediaqueries.js - CSS Helper and CSS3 Media Queries Enabler | |
author: Wouter van der Graaf <wouter at dynora nl> | |
version: 1.0 (20110330) | |
license: MIT | |
website: http://code.google.com/p/css3-mediaqueries-js/ | |
W3C spec: http://www.w3.org/TR/css3-mediaqueries/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in *.jpg; do convert $i -resize 97x57 $i; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Need 2 directories: | |
# 1 ./toprocess | |
# 2 ./processed | |
# | |
# PHP dumps PDFs into "toprocess" dir. | |
# This script then converts and dump jpgs into "processed" | |
# Then deletes pdf contents of current directory. | |
# | |
# Run this script via crontab as so: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Creating a user in Magento when ity magically disappears | |
LOCK TABLES `admin_role` WRITE , `admin_user` WRITE; | |
SET @SALT = "rp"; | |
SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), CONCAT(":", @SALT )); | |
SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL; | |
INSERT INTO `admin_user` (firstname,lastname,email,username,password,created,lognum,reload_acl_flag,is_active,extra,rp_token_created_at) | |
VALUES ('Firstname','Lastname','[email protected]','myuser',@PASS,NOW(),0,0,1,@EXTRA,NOW()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixes home dir and SSH key perms | |
chmod go-wrx ~ | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/authorized_keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DOCTYPE html> | |
<html> | |
<head> | |
<title>The iFrame file included in the above parent page</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
/** | |
* This will send every second | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>The IFrame</title> | |
</head> | |
<body> | |
<h1>IMAGINE THIS IS PRODUCT DESIGNR</h1> | |
<form id="form-pdesignr"> | |
<input type="button" value="Click Me to Post Data Up ^" /> | |
</form> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TRUNCATE log_customer; | |
TRUNCATE log_quote; | |
TRUNCATE log_summary; | |
TRUNCATE log_summary_type; | |
TRUNCATE log_url; | |
TRUNCATE log_url_info; | |
TRUNCATE log_visitor; | |
TRUNCATE log_visitor_info; | |
TRUNCATE log_visitor_online; |