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
#!/bin/sh | |
# | |
# A shell script used to setup rules for iptables. Rules gleened from | |
# various websites. | |
# | |
# References: | |
# http://www.newartisans.com/blog_files/tricks.with.iptables.php | |
# Wipe the tables clean | |
iptables -F |
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
rpm -Uvh http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm | |
yum install postgresql93 postgresql93-server postgresql93-contrib postgresql93-devel postgis2_93 postgis2_93-utils | |
#Configure PostgreSQL | |
chkconfig postgresql-9.3 on | |
service postgresql-9.3 initdb | |
service postgresql-9.3 start | |
# Create PostGIS template |
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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical" | |
tools:context=".MainActivity"> | |
<RelativeLayout | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content"> |
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+ImageEffects.m | |
// AnimationExamples | |
// | |
// Created by Timothy Patrick Johnson on 7/3/13. | |
// Copyright (c) 2013 Meister. All rights reserved. | |
// | |
#import "UIImage+ImageEffects.h" |
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
grep -Ri 'oldprojectame' * | cut -f1 -d':' | sort | uniq |
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
package com.chroman.test; | |
import android.app.DatePickerDialog; | |
import android.content.Context; | |
import android.widget.DatePicker; | |
/** | |
* Created by chroman on 09/10/13. | |
*/ | |
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
module Paperclip | |
class Blur < Processor | |
def initialize file, options = {}, attachment = nil | |
super | |
@format = File.extname(@file.path) | |
@basename = File.basename(@file.path, @format) | |
end |
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 *) negativeImage | |
{ | |
UIGraphicsBeginImageContext(self.size); | |
CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeCopy); | |
[self drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)]; | |
CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeDifference); | |
CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(),[UIColor whiteColor].CGColor); | |
CGContextFillRect(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, self.size.width, self.size.height)); | |
UIImage *negativeImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
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 *)blendOverlay:(UIImage *)topImage withBaseImage:(UIImage *)baseImage toSize:(CGFloat)imageSize | |
{ | |
UIGraphicsBeginImageContext(CGSizeMake(imageSize, imageSize)); | |
[baseImage drawInRect:CGRectMake(0.0, 0.0, imageSize, imageSize)]; | |
[topImage drawInRect:CGRectMake(0.0, 0.0, imageSize, imageSize) blendMode:kCGBlendModeNormal alpha:0.5]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
return image; | |
} |
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 *)blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur { | |
if (blur < 0.f || blur > 1.f) { | |
blur = 0.5f; | |
} | |
int boxSize = (int)(blur * 100); | |
boxSize = boxSize - (boxSize % 2) + 1; | |
CGImageRef img = image.CGImage; | |
vImage_Buffer inBuffer, outBuffer; |