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
<?php | |
class Figure // Chessboard - Rook coordinates and its motion: | |
{ | |
private $x, $y; | |
// setting initial position of the Rook: | |
public function SetCoords($absc, $oord) { | |
if (($absc>=1 and $absc<=8) and ($oord>=1 and $oord<=8)) { | |
$this->x = $absc; |
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
Being With And Without You | |
It's like a dream at night you enter | |
All around you is pale and blue, | |
As the only part of this world that matters | |
Is the gift of dreaming which is You! | |
Suddenly thrown into fairiest of tales, | |
Is the experience of seeing your face |
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 cst.dave; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: root | |
* Date: 12/23/13 | |
* Time: 3:32 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class User { |
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 cst.dave; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.*; | |
import javax.servlet.http.*; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: david |
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 | |
if [[ $1 =~ \.zip$ ]]; then | |
wget $1 && sudo unzip *.zip && sudo rm *.zip | |
elif [[ $1 =~ \.gz$ ]]; then | |
wget $1 && sudo tar -zxvf *.gz && sudo rm *.gz | |
fi | |
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 | |
# This one displays both service and port number colored in red (most likely): | |
egrep --color -o -m 1 '^'$1' *[0-9]+' /etc/services | |
# This one displays only the port number: | |
egrep -o -m 1 '^'$1'\s+[0-9]+' /etc/services | grep -P -o '\d+$' |
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 | |
program_name=`basename $0` | |
function print_usage() { | |
echo -e "Usage: ${program_name} [-i module1 module2 ... ] [-e database_name] [-m \"git commit message\"]" | |
exit "$1" | |
} | |
function install_modules() { |
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 | |
drupal_version=$1 | |
site_name=$2 | |
db_user=$3 | |
db_pass=$4 | |
db_name=$5 | |
function print_usage() { | |
echo -e "Usage: $0 drupal_version site_name db_user db_pass db_name" |
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
<?php | |
$has_event_class = 'has-event-false'; | |
$events = array( | |
0 => array( | |
'city' => 'Tbilisi', | |
'start_date' => '2014-11-18 09:00', | |
'end_date' => '2014-11-18 12:00', | |
'name' => 'Meeting with Jesus' | |
), |
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
$calendar = array( | |
9 => array( | |
0 => array(), | |
1 => array(), | |
2 => array(), | |
3 => array( | |
"start_date" => 9, | |
"end_date" => 12, | |
"event_name" => "Cool Event0" | |
), |
OlderNewer