Skip to content

Instantly share code, notes, and snippets.

View andywenk's full-sized avatar

Andreas Wenk andywenk

View GitHub Profile

Simple setup for starting with git

Andy Wenk - 02.10.2009

This is a note to myself how to create a git repository. I am assuming to have root access to an own server. In this case it's (again) a Debian Linux machine with running Lenny.

SSH keys


The clone, pull and push process uses ssh, so it is necessary to create keys. Use rsa

Some simple git commands

Andy Wenk - 17.11.2009

This is the second part of some notes to myself concerning git. Let's first have a look to some basic commands

basic commands


actualize the repo $ git pull

JooseClass("Hotel", {
has: {
formdiv: {is: "rw"},
validate: {is: "ro", init: function() { return new Validate() }}
},
methods: {
search: function (id, site) {
var div = $('hotels_list');
var params = this.get_params_json_and_id(id);
<!DOCTYPE html>
<html lang="en">
<head>
<title>JavasScript Playground</title>
<script src="jscript.js"></script>
</head>
<body>
<h1>JavasScript Playground</h1>
<script>
var arr = ['one', 'two', 'three'];
git-repos/whatsupdoc# js
Rhino 1.7 release 3 PRERELEASE 2009 12 12
js>
git-repos/whatsupdoc# which js
[...]/git-repos/narwhal/bin/js
git-repos/whatsupdoc# js lib/whatsupdoc.js
Error: require error: couldn't find "markdown"
do I have to add extra packages?
// more or less a note to myself ...
//
// This is an example for displaying a (say) PDF print button (id = submit4) only, if a particular
// button out of a set of multiple button is pressed
//
// requires jQuery
// originally there was some more stuff in the Attendees object
Attendees = {};
// Using prototype.js
// There is a form with a lot of select fields:
/*
<form name="f" id="f" action="#">
<input id="price_8" value="28.00" type="hidden">
<select name="ticket_8" id="ticket_8" class="w50">
<option value="0" label="0">0</option>
<option value="1" label="1">1</option>
</select>
#!/bin/bash
RSYNC="/usr/bin/rsync"
DAY=`/bin/date "+%u_%A"`
MYSQLDUMP="/usr/bin/mysqldump"
DBDIR=`ls /www/mysql/`
BACKUPDIR="/www/backup/week/$DAY"
DBPASS="secret"
test -d $BACKUPDIR || mkdir $BACKUPDIR
#!/bin/bash
# This script deletes the extensions.cache, extensions.ini and
# extensions.rdf files because of trouble with Firefox 2 and 3
# running togehter on the same machine
# usage: ./delFirefoxExtFiles [folder]
# if the folder was submitted we save it in DEFFOLDER
DEFFOLDER="$1"
// This is a really simple performance test
// use this with firebug
var start = (new Date()).getMilliseconds();
// function or script stuff
var end = (new Date()).getMilliseconds();
var diff = end - start;
console.log('start: ' + start + ' end: ' + end + ' diff: ' + diff);