Skip to content

Instantly share code, notes, and snippets.

@coneybeare
coneybeare / giantuser.html
Last active August 29, 2015 14:04
Sample HTML Signature
<style type="text/css">
a.link{margin:0;padding:0;border:none;text-decoration:none;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="format-detection" content="telephone=no">
<br />
<br />
require 'net/http'
require 'uri'
require 'cgi'
require "mysql"
db = Mysql.real_connect("<MYSQL SERVER>", "<MYSQL USER>", "<MYSQL PASSWORD>", "<MYSQL TABLE>")
rows = db.query("SELECT * FROM posts")
while (row = rows.fetch_row)
require 'net/http'
require 'uri'
require 'cgi'
require "mysql"
db = Mysql.real_connect("<MYSQL SERVER>", "<MYSQL USER>", "<MYSQL PASSWORD>", "<MYSQL TABLE>")
rows = db.query("SELECT * FROM posts")
while (row = rows.fetch_row)
////////////////////////////
// .h file
#import <UIKit/UIKit.h>
@interface DemoTableViewCell : UITableViewCell {
}
@end
////////////////////////////
- (UIImage *)addBorderToImage:(UIImage *)image {
CGImageRef bgimage = [image CGImage];
float width = CGImageGetWidth(bgimage);
float height = CGImageGetHeight(bgimage);
// Create a temporary texture data buffer
void *data = malloc(width * height * 4);
// Draw image to buffer
CGContextRef ctx = CGBitmapContextCreate(data,
// #Lighter r,g,b,a #Darker r,g,b,a
#define MAIN_COLOR_COMPONENTS { 0.153, 0.306, 0.553, 1.0, 0.122, 0.247, 0.482, 1.0 }
#define LIGHT_COLOR_COMPONENTS { 0.478, 0.573, 0.725, 1.0, 0.216, 0.357, 0.584, 1.0 }
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
if (imageReady) {
UIImage *img = [UIImage imageNamed: @"navigation_background.png"];
[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range [1,2])
(\+)? (?# the application may have a + in front of the name [3])
([^\s]+) (?# bundle name [4])
\s* \w+ \s* (?# the versions--generally "??? [???]")
\<?([[:xdigit:]]{32})?\>? (?# possible UUID [5])
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [6])
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier {
if (self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier]) {
// Background Image
self.backgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
}
return self;
}
- (void)setPosition:(UACellBackgroundViewPosition)newPosition {
//
// UACellBackgroundView.h
// Ambiance
//
// Created by Matt Coneybeare on 1/31/10.
// Copyright 2010 Urban Apps LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
<HTML>
<HEAD>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=UTF-8">
<TITLE>iTunes Label Connect</TITLE>
<LINK HREF="/WebObjects/piano.woa/Contents/WebServerResources/iTMSApplication.css" TYPE="text/css" REL="STYLESHEET">
<script language="javascript">
//function vndrID()
//{
// var vendorID;