Skip to content

Instantly share code, notes, and snippets.

View ulfklose's full-sized avatar

Ulf K. ulfklose

View GitHub Profile
// ==UserScript==
// @name GitHub Dashboard Twitter
// @namespace http://tekkub.net/
// @include https://github.com/
// ==/UserScript==
$("div.news h1").before(
$("<div>").attr("id", "twitter_div2").append(
$("<h1>").text("GitHub status ").css({
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' > verzeichnisstruktur.txt
#!/bin/sh
#######################################################
# UNIX TREE #
# Version: 2.3 #
# File: ~/apps/tree/tree.sh #
# By Dem Pilafian #
# #
# Displays Structure of Directory Hierarchy #
# ------------------------------------------------- #
# Sample configuration for proxying an installation of EtherPad for Apache 2
# The configuration should forward the domain requests to the EtherPad server running on port 9000 on localhost
# See these instructions to setup EtherPad on your server: http://pauleira.com/13/installing-etherpad/
<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld
ServerAdmin admin@domain.tld
ProxyRequests Off
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
user www-data;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
upstream railsapp {
server unix:/var/run/thin/railsapp.0.sock;
server unix:/var/run/thin/railsapp.1.sock;
}
server {
listen 80;
server_name railsapp.domain.tld;
access_log /var/www/railsapp/log/access.log;
./configure \
--prefix=/usr \
--conf-path=/etc/nginx/nginx.conf \
--http-log-path=/var/log/nginx/access_log \
--error-log-path=/var/log/nginx/error_log \
--pid-path=/var/run/nginx.pid \
--http-client-body-temp-path=/var/tmp/nginx/client \
--http-proxy-temp-path=/var/tmp/nginx/proxy \
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
--with-md5-asm --with-md5=/usr/include \
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
\let\oldincludegraphics = \includegraphics
\def\includegraphics{\begingroup\catcode`_=12 \includegraphicsx}
\newcommand{\includegraphicsx}[2][]{\IfFileExists{#2}
{\oldincludegraphics[#1]{#2}}
{\framebox{\parbox[c]{12em}{#2}}}
\endgroup}