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 persons = [ | |
{ name: 'Jhon', age: 21 }, | |
{ name: 'Alice', age: 37 }, | |
{ name: 'Brenda', age: 45 }, | |
{ name: 'Manuel', age: 12 }, | |
{ name: 'Maria', age: 37 } | |
]; | |
function sortByAge(persons) { | |
return persons.sort(function(a, b){ |
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
; | |
; Riemann Service Down Alerts | |
; =================================================== | |
; | |
; The index stores the most recent state for any [host, service] pair. Clients | |
; can search the index for various states with a basic query language. The | |
; default implementation is a NonBlockingHashMap. | |
; | |
(let [my-index (index) |
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
@Grab(group='org.apache.httpcomponents',module='httpclient',version='4.2.5') | |
@Grab(group='org.apache.httpcomponents',module='httpmime',version='4.2.5') | |
import org.apache.http.client.HttpClient | |
import org.apache.http.impl.client.DefaultHttpClient | |
import org.apache.http.client.methods.HttpPost | |
import org.apache.http.entity.mime.content.FileBody | |
import org.apache.http.entity.mime.MultipartEntity | |
import org.apache.http.HttpResponse | |
import org.apache.http.HttpEntity | |
import org.apache.http.util.EntityUtils |
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 groovy.json.* | |
import groovyx.net.http.* | |
import static groovyx.net.http.ContentType.* | |
import groovy.xml.* | |
final API_URL = "http://api.scribd.com/api" | |
final API_KEY = "api_key_scribd" | |
def restScribd = new RESTClient(API_URL) |
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
<g:applyLayout name="userProfile"> | |
<html> | |
<head> | |
<script type="text/javascript" src='http://www.scribd.com/javascripts/scribd_api.js'></script> | |
</head> | |
<body> | |
<div class="colIzq fleft"> | |
<div id='embedded_doc'></div> | |
<script type='text/javascript'> | |
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.images | |
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
import grails.converters.JSON | |
class CroopingController { | |
def s3ImageService | |
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
$(function(){ | |
var CropImage = { | |
id:'crop_image', | |
$modal_cropping : $('#modalCroopingImage'), | |
$div_cropping:$('#cropping'), | |
jcrop_api:"", | |
original : { | |
width: 0,height: 0,url: "",uuid: "" | |
}, |
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
<style> | |
.button-photo { | |
margin-top: 20px; | |
margin-left: 20px; | |
} | |
div.preview_image { | |
width: 100px; | |
height: 100px; | |
overflow:hidden; | |
} |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
#JAVA_HOME | |
export JAVA_HOME=`/usr/libexec/java_home -v 1.7` | |
#MAVEN | |
export M2_HOME=/usr/local/maven-3.0.5 | |
export MAVEN_OPTS=-Xmx1024m |
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
<html> | |
<head> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"></link> | |
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> | |
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script> | |
<style> | |
.popover-all { | |
position: absolute; | |
top: 0; | |
left: 0; |
NewerOlder