View backup script
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 | |
source=myLogin@hostname: | |
snapshotDir=/path/to/backup/dir | |
if [ -d $snapshotDir/hourly.3 ] | |
then | |
rm -rf $snapshotDir/hourly.3 | |
fi |
View backup script daily
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 | |
snapshotDir=/path/to/backup/dir | |
if [ -d $snapshotDir/daily.2 ] | |
then | |
rm -rf $snapshotDir/daily.2 | |
fi | |
if [ -d $snapshotDir/daily.1 ] |
View base 64
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
$image = file_get_contents('/path/to/file'); | |
$base64 = base64_encode($image); | |
echo 'data:image/png;base64,'.$base64."\n"; |
View base 64
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
<?php | |
// Get parameters | |
$arguments = $_SERVER['argv']; | |
array_shift($arguments); | |
if (empty($arguments)) { | |
die("File path is undefined\n"); | |
} | |
$filePath = array_shift($arguments); | |
if (!is_file($filePath)) { | |
die("File not found : $filePath\n"); |
View gist:983196
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
public function __get($name) | |
{ | |
if (method_exists($this, "get_$name")) { | |
return $this->{"get_$name"}(); | |
} else if (method_exists($this, "set_$name")) { | |
throw new Exception("Writeonly property $name"); | |
} else { | |
throw new Exception("Undefined property $name"); | |
} | |
} |
View gist:1040463
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
/* Here we go, show the magazine */ | |
$('#viewer').booklet({ | |
width: bookWidth * 2, | |
height: bookHeight, | |
speed: 750, | |
pagePadding: 0, | |
pageNumbers: false, | |
closed: true, | |
autoCenter: true, |
View robot.js
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
this.mainInstance; | |
this.enemyFound = false; | |
setInterval(this.move, 1000); | |
}; | |
Robot.prototype.move = function() { |
View index.html
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<style>.cmx-user-scene2 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg);"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |
View web-font.css
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
@font-face { | |
font-family: 'BebasNeueRegular'; | |
src: url('../fonts/BebasNeue-webfont.eot'); | |
src: url('../fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'), | |
url('../fonts/BebasNeue-webfont.woff') format('woff'), | |
url('../fonts/BebasNeue-webfont.ttf') format('truetype'), | |
url('../fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
View Lead technique PHP Zend
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
Poste de Lead technique PHP Zend chez un éditeur, dans le secteur de l'énergie, en CDI. | |
Vous occuperez une place stratégique au sein de la société en prenant en charge l'équipe technique. | |
* 80% de développement | |
* 20% de gestion de projet | |
Responsabilité de la conception et du développement d'applications client/serveur. | |
Environnement technique : | |
* PHP 5.3 |
OlderNewer