- Ensure you can
ssh user@targetserver
successfully- Public/private keys are a smart choice here
- On
targetserver
- Example here assumes all Git repository users are members of a
gitusers
group, adjust to suit mkdir -p ~/path/to/repository
cd ~/path/to/repository
git init --bare --shared=group
- Example here assumes all Git repository users are members of a
- Switch
--shared=group
will addcore.sharedrepository = 1
to the repositories~/path/to/repository/config
file
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 PlaceHolder = "PlaceHolder"; | |
var myArr = | |
[{id:5, parentid:0, text:PlaceHolder}, | |
{id:6, parentid:0, text:PlaceHolder}, | |
{id:7, parentid:0, text:PlaceHolder}, | |
{id:8, parentid:7, text:PlaceHolder}, | |
{id:9, parentid:7, text:PlaceHolder}, | |
{id:10, parentid:5, text:PlaceHolder}, | |
{id:11, parentid:5, text:PlaceHolder}, | |
{id:12, parentid:7, text:PlaceHolder}, |
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
function htmlEscape(str) { | |
return String(str) | |
.replace(/{/g, '%7B') | |
.replace(/"/g, '%22') | |
.replace(/:/g, '%3A') | |
.replace(/}/g, '&7D') | |
.replace(/,/g, '%2C') | |
.replace(/@/g, '%40') | |
.replace(/\\/g, '') | |
.split(' ').join('+') |
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 $ = require('cheerio'), | |
_ = require('underscore'), | |
request = require('request'), | |
// If you want to create a file | |
images = [], | |
path = require('path'), | |
dir = path.join(__dirname,'\Templates'), | |
fs = require('fs'), | |
GetImage = function(file){ | |
var HtmlFile = fs.readFileSync(file).toString(), |
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
Add a second HDD | |
In this tutorial we will add a second hard drive to our machine running Debian linux. | |
If you have just added a virtual disk, make sure you restart the virtual machine before mounting the new disk. | |
First we'll have to find out what the device name is for this disk |
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
<html> | |
<head> | |
<title>Date picker</title> | |
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/base/jquery-ui.css"/> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> | |
</head> | |
<body> | |
<form> | |
<input id="datepicker" name="inf_field_Birthday" type="text" /> |
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
<html> | |
<body> | |
<style> | |
.popup{ | |
position:fixed; | |
left:50%; | |
} | |
.popup .wrapper{ | |
position:relative; |
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
<html> | |
<head> | |
<link type="stylesheet" src="style.css" /> | |
</head> | |
<body> | |
<section> | |
<article> | |
<h2>Article title</h2> | |
<p>some textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome text </p> | |
</article> |
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
Module.directive('ng-blur', function() { | |
return { | |
restrict: 'A', | |
link: function postLink(scope, element, attrs) { | |
element.bind('blur', function () { | |
scope.$apply(attrs.ngBlur); | |
}); | |
} | |
}; | |
}); |
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
First, create a directory on your server and initialize an empty git repository. I like to serve my websites from ~/www/, so that's what I'll do in this example. | |
mkdir ~/www/example.com && cd ~/www/example.com | |
git init | |
Next, let's set up your server's git repo to nicely handle deployment via git push. | |
git config core.worktree ~/www/example.com | |
git config receive.denycurrentbranch ignore | |
Finally, we'll set up a post-receive hook for git to check out the master branch so your web server can serve files from that branch. (Remember, ^D is Control+D, or whatever your shell's EOT character is. |
OlderNewer