Skip to content

Instantly share code, notes, and snippets.

View aszel's full-sized avatar
🏠
Working from home

Martin Becker aszel

🏠
Working from home
  • Arvato
  • Deutschland
View GitHub Profile
var selects = document.getElementsByTagName('select');
for (i = 0; i < selects.length; i++) {
if (!$(selects[i]).val()) {
$(selects[i]).val("0");
listenOnChangeOfSelectInputs($(selects[i]));
}
}
$("#assign_form_PRICE_save").click();
@aszel
aszel / ApacheConfig
Created January 11, 2015 12:52
Apache config on Mac
## enable vhosts
sudo vim /etc/apache/httpd.conf
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
## create vhost and set directory
sudo vim /etc/apache/extra/httpd-vhosts.conf
<VirtualHost *:80 >
@aszel
aszel / TestingGist
Created August 26, 2014 14:55
This Gist is for testing only
some gist for testing
this is an update
<!-- source: http://tutorialzine.com/2014/07/css-inline-help-tips/ -->
<div class="help-tip">
<p>This is the inline help tip! It can contain all kinds of HTML. Style it as you please.</p>
</div>
.help-tip{
position: absolute;
top: 18px;
right: 18px;
<?php
// http://php.net/manual/de/function.date.php
// Zeilenumbruch
$b = "\n";
$bb = "\n\n";
$bbb = "\n\n\n";
Sicherheit RaspberryPi
1.
Default-User "pi" umbenennen
usermod --move-home --login martin --home /home/martin pi
2.
root-login verbieten
sudo vi /etc/ssh/sshd_config
PermitRootLogin no
// Define a class like this
function Person(name, gender){
// Add object properties like this
this.name = name;
this.gender = gender;
}
// Add methods like this. All Person objects will be able to invoke this
Person.prototype.speak = function(){
@aszel
aszel / chat-frontend.js
Created August 24, 2012 20:16 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@aszel
aszel / chat-frontend.js
Created August 24, 2012 19:19 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;