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
<% [:notice, :error, :alert].each do |level| %> | |
<% unless flash[level].blank? %> | |
<div class="alert <%= flash_class(level) %>"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
<span><%= flash[level] %></span> | |
</div> | |
<% end %> | |
<% 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
#! /bin/bash | |
# build the environment | |
mkdir tessenv; cd tessenv | |
TROOT=`pwd` | |
mkdir $TROOT/stockfonts; mkdir $TROOT/build; mkdir $TROOT/build/eng | |
echo "Environment built" | |
# Get the stock english fonts from Google (old, but they work) | |
cd $TROOT/stockfonts | |
GET http://tesseract-ocr.googlecode.com/files/boxtiff-2.01.eng.tar.gz > boxtiff-2.01.eng.tar.gz |
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
#if defined _cplusplus | |
extern "C" { | |
#endif | |
void your_c_function() | |
{ | |
... | |
} | |
#if defined _cplusplus | |
} | |
#endif |
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
#import <Foundation/Foundation.h> | |
@interface NSString (Concatenation) | |
- (NSString *):(NSString *)a; | |
- (NSString *):(NSString *)a :(NSString *)b; | |
- (NSString *):(NSString *)a :(NSString *)b :(NSString *)c; | |
- (NSString *):(NSString *)a :(NSString *)b :(NSString *)c :(NSString *)d; | |
- (NSString *)concat:(NSString *)strings, ...; |
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.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm | |
yum install postgresql92 postgresql92-server postgresql92-contrib postgis2_92 postgis2_92-utils | |
chkconfig postgresql-9.2 on | |
service postgresql-9.2 initdb | |
service postgresql-9.2 start |
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
# su - postgres | |
psql testgisdb -f /usr/share/postlbs/routing_core.sql | |
psql testgisdb -f /usr/share/postlbs/routing_core_wrappers.sql | |
psql testgisdb -f /usr/share/postlbs/routing_topology.sql | |
psql testgisdb -f /usr/share/postlbs/routing_tsp.sql | |
psql testgisdb -f /usr/share/postlbs/routing_tsp_wrappers.sql | |
psql testgisdb -f /usr/share/postlbs/routing_dd.sql | |
psql testgisdb -f /usr/share/postlbs/routing_dd_wrappers.sql |
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
NSString *address = @"http://gdata.youtube.com/feeds/api/playlists/PLH6Z1vsFvaeTMmRL8GfC3i_rAwLKOOtNF?v=2"; | |
NSURL *url = [[NSURL alloc] initWithString:address]; | |
NSError *error; | |
NSString *XML = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error]; | |
NSData *data = [XML dataUsingEncoding:NSUTF8StringEncoding]; | |
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data]; |
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
jQuery.ajax({ | |
type: 'POST', | |
url: 'validarCodigoInvitacion', | |
data: {inputCodigo : '41F8**** tu codigo'}, | |
dataType: 'json', | |
success: function(response) { console.log(response) ;}, | |
error: function(req, err){ console.log(err); } | |
}); |
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
sh -c 'cat /usr/share/dict/words | sed -n $(echo $((`cat /dev/urandom | od -N3 -An -i` % `cat /usr/share/dict/words | wc -l`)))p' |
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 | |
# | |
# nginx Startup script for nginx | |
# | |
# chkconfig: - 85 15 | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx | |
# pidfile: /var/run/nginx.pid | |
# description: nginx is an HTTP and reverse proxy server |