Skip to content

Instantly share code, notes, and snippets.

View basgys's full-sized avatar

Bastien Gysler basgys

View GitHub Profile
@basgys
basgys / gist:1482038
Created December 15, 2011 17:47
Trigger call to all passenger instances
#!/bin/bash
if [ -z $1 ]; then
echo "Usage : "$0" http://passenger_address"
else
echo "address to call: "$1
passenger-status --verbose | grep 'Password:' | cut -d ':' -f2 | while read line; do
echo "Calling : "$line # Passenger instance password
curl --header "X-Passenger-Connect-Password: "$line $1 > /dev/null 2>&1
@basgys
basgys / main.java
Created September 23, 2011 21:35
Main class
package ch.hegarc.ig.person;
import ch.hegarc.ig.person.business.Person;
public class Main {
public static void main(String[] args) {
Person p1 = new Person(1, "Bastien", "Gysler");
p1.print();
@basgys
basgys / person.java
Created September 23, 2011 21:31
Person class
package ch.hegarc.ig.person.business;
public class Person {
private Integer number;
private String firstName;
private String lastName;
public Person() {
this(null, null, null);