Permalink
Browse files

Added git fetch script

  • Loading branch information...
1 parent 8247b9e commit d92b736ffcc79db5592540023131d878cb9e23c9 @mhevery mhevery committed Aug 28, 2012
Showing with 85 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +15 −0 generatePassword.php
  3. +12 −0 gitFetchSite.php
  4. +56 −0 greet.php
View
@@ -1,3 +1,5 @@
.idea
.settings
node_modules/
+old-yellow/
+slides/
View
@@ -0,0 +1,15 @@
+<?php
+$callback = $_GET['callback'];
+$password = '';
+for($counter = rand(3,10); $counter > 0; $counter --) {
+ $password = $password . chr(rand(33, 126));
+}
+$data = array(
+ "password" => $password );
+$json = json_encode($data);
+header("Content-type: text/javascript");
+if ($callback)
+ echo $callback .' (' . $json . ');';
+else
+ echo $json;
+?>
View
@@ -0,0 +1,12 @@
+<html>
+ <head>
+ <title>Update site from: GitHub master</title>
+ </head>
+<body>
+ <pre><?php echo `date`; ?></pre>
+ <pre><?php echo `git fetch origin`; ?></pre>
+ <pre><?php echo `git checkout origin/master -f`; ?></pre>
+ <pre><?php echo `git status`; ?></pre>
+ <pre><?php echo `git log -n1`; ?></pre>
+</body>
+</html>
View
@@ -0,0 +1,56 @@
+<?php
+$name = $_GET['name'];
+$callback = $_GET['callback'];
+$salutations = array(
+ "Adab",
+ "Ahoj",
+ "An-nyeong-ha-se-yo",
+ "Apa khabar",
+ "Barev Dzez",
+ "Buenos días",
+ "Bula Vinaka",
+ "Chào",
+ "Ciao",
+ "Dia Duit",
+ "Hallo",
+ "Hallå",
+ "Halló",
+ "Halo",
+ "Haye",
+ "Hei",
+ "Hej",
+ "Hello",
+ "Helo",
+ "Hola",
+ "Kamusta",
+ "Konnichiwa",
+ "Merhaba",
+ "Mingalarba",
+ "Namaskar",
+ "Namaste",
+ "Olá",
+ "Pryvit",
+ "Pryvitannie",
+ "Përshëndetje",
+ "Salam",
+ "Salut",
+ "Sat Sri Akal",
+ "Sholem aleikhem",
+ "Sveiki",
+ "Szia",
+ "Tere",
+ "Zdraveĭte",
+ "Zdravo" );
+$salutation = $salutations[rand(0, count($salutations) - 1)];
+$greeting = $salutation . ' ' . $name . '!';
+$data = array(
+ "name" => $name,
+ "salutation" => $salutation,
+ "greeting" => $greeting );
+$json = json_encode($data);
+header("Content-type: text/javascript");
+if ($callback)
+ echo $callback .' (' . $json . ');';
+else
+ echo $json;
+?>

0 comments on commit d92b736

Please sign in to comment.