This file contains hidden or 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
- (void)save { | |
UIImage *bgImage = editView.image; | |
//UIImage *fgImage = yoloView.image; | |
// a rect that has has the transformation from the yoloview applied to it | |
CGRect rect = CGRectApplyAffineTransform([yoloView frame], [yoloView transform]); | |
// the rect we are manipulating | |
//CGRect rect = CGRectMake(0, 0, yoloView.size.width, yoloView.image.size.height); |
This file contains hidden or 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
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; | |
//imageView.image = image; | |
int w = image.size.height; | |
int h = image.size.width; | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | |
CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst); | |
CGContextDrawImage(context, CGRectMake(0, 0, w, h), image.CGImage); |
This file contains hidden or 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
#/usr/bin/perl | |
use strict; | |
use warnings; | |
use Net::OSCAR qw(:standard); | |
use LWP::Simple; | |
use Proc::Daemon; | |
# Daemonize | |
Proc::Daemon::Init(); | |
print 'daemonizing'; |
This file contains hidden or 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
* { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
#tools { | |
list-style: none; | |
margin: 4px 0px 0px 10px; | |
padding: 0; |
This file contains hidden or 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 canvas = document.getElementById("canvas"), | |
image = canvas.toDataURL("image/png"); | |
$.ajax({ | |
url: "https://app-engine-identifier.appspot.com/upload", | |
type: "POST", | |
data: { imgdata : image }, | |
crossDomain: true, | |
success: function(data){ | |
console.log(data); // yayyy |
This file contains hidden or 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
#!/usr/bin/env python | |
# | |
from __future__ import with_statement | |
import os, urllib2, re, base64 | |
from google.appengine.api import users, images, files | |
from google.appengine.ext import blobstore, db, webapp | |
from google.appengine.ext.webapp import blobstore_handlers | |
from google.appengine.ext.webapp.util import run_wsgi_app |
This file contains hidden or 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
<div id="infobox" class="bbox white padding inlineblock"> |
This file contains hidden or 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
.white { | |
background-color:white; | |
border:1px solid #afafaf; | |
} | |
.inlineblock { | |
display:inline-block; | |
} | |
.bbox { | |
-moz-box-shadow: -1px 1px #000,-2px 2px #000,-3px 3px #000; | |
-webkit-box-shadow: -1px 1px #000,-2px 2px #000,-3px 3px #000; |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Module> | |
<ModulePrefs title="Starter App"> | |
<Require feature="rpc"/> | |
</ModulePrefs> | |
<Content type="html"><![CDATA[ | |
<!DOCTYPE html> | |
<script src="//hangoutsapi.talkgadget.google.com/hangouts/api/hangout.js?v=1.1"></script> | |
<!-- // production |
This file contains hidden or 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
# a test version of the app.yaml used for development. This is not intended to be checked in | |
application: your-application-identifier | |
version: 1 | |
runtime: python27 | |
api_version: 1 | |
threadsafe: false | |
# Set cache duration to 0 for development | |
default_expiration: "0m" |