This file contains 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 | |
# From Gerrit Code Review 2.5-rc0 | |
# | |
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/) | |
# | |
# Copyright (C) 2009 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
This file contains 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
<form name="survey" id="ratingaccomplish"> | |
<div id="offerRating" style="display: block;"> | |
<hr> | |
<label for="rating"><b>Rate your download experience:</b></label> | |
<p> | |
<span class="star-rating-control"> | |
<div class="rating-cancel" style="display: none;"><a title="Cancel Rating"></a></div> | |
<div class="star-rating rater-0 star required star-rating-applied star-rating-live" id="Rating_1"><a title="1">1</a></div> | |
<div class="star-rating rater-0 star star-rating-applied star-rating-live" id="rating_2"><a title="2">2</a></div> | |
<div class="star-rating rater-0 star star-rating-applied star-rating-live" id="Rating_3"><a title="3">3</a></div> |
This file contains 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
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<servers> | |
<server> | |
<id>mycompany-repository</id> | |
<username>admin</username> | |
<password>password</password> | |
</server> |
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mycom.app</groupId> | |
<artifactId>my-app</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>my-app</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> |
This file contains 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"?> | |
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>wagon-maven-plugin</artifactId> | |
<packaging>pom</packaging> | |
<version>${version}</version> | |
<build> |
This file contains 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 Connection = require('ssh2'); | |
var c = new Connection(); | |
c.on('connect', function() { | |
console.log('Connection :: connect'); | |
}); | |
c.on('ready', function() { | |
console.log('Connection :: ready'); | |
c.exec('uptime', function(err, stream) { | |
if (err) throw err; |
This file contains 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
The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment. | |
Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules. | |
1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted) | |
2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need: | |
a. sudo apt-get install openssh-server | |
b. sudo apt-get install libssl-dev | |
c. sudo apt-get install git | |
d. sudo apt-get install g++ | |
e. sudo apt-get install make |
This file contains 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 | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
This file contains 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
/** | |
* @param part | |
* @return | |
*/ | |
private String getFileName(final Part part) { | |
final String partHeader = part.getHeader("content-disposition"); | |
for (String content : partHeader.split(";")) { | |
if (content.trim().startsWith("filename")) { | |
return content.substring(content.indexOf('=') + 1).trim().replace("\"", ""); |
This file contains 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 | |
### BEGIN INIT INFO | |
# Provides: tomcat | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/Stop Tomcat server | |
### END INIT INFO |
OlderNewer