Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Achilleas Pipinellis axilleas

🏠
Working from home
View GitHub Profile
@axilleas
axilleas / gitlab.sh
Created Jun 17, 2012 — forked from cristianrasch/gitlab.sh
Install Gitlab on Debian Squeeze/Wheezy
View gitlab.sh
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git
@axilleas
axilleas / gist:3115671
Created Jul 15, 2012
Adding magnet protocol association to Firefox
View gist:3115671
In about:config add the following:
network.protocol-handler.expose.magnet
Set it's initial value to false. When you open a magnet link you will be prompted with a Launch Application dialogue. From there simply select your chosen torrent client. This technique can also be used with other protocols.
@axilleas
axilleas / gitlab_apache.conf
Created Aug 9, 2012
Apache configuration file for gitlab
View gitlab_apache.conf
# thanks to http://www.andmarios.com/en/2012/06/gitlab-on-an-ubuntu-10-04-server-with-apache/
<VirtualHost *:80>
ServerName arch.localdomain
DocumentRoot /home/gitlab/gitlab/public
ErrorLog /var/log/httpd/gitlab_error_log
CustomLog /var/log/http/gitlab_access_log combined
<Directory /home/gitlab/gitlab/public>
AllowOverride All
@axilleas
axilleas / gitlab_nginx.conf
Created Aug 9, 2012
Nginx configuration file for gitlab
View gitlab_nginx.conf
server {
listen YOUR_SERVER_IP:80; # e.g., listen 192.168.1.1:80;
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
root /home/gitlab/gitlab/public;
# individual nginx logs for this gitlab vhost
access_log /var/log/nginx/gitlab_access.log;
error_log /var/log/nginx/gitlab_error.log;
location / {
@axilleas
axilleas / archgitlab.sh
Last active Mar 29, 2021
Install GitLab 5.0 on Archlinux
View archgitlab.sh
#!/bin/bash
##########################
## Check if run as root ##
##########################
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
View mplayer-minimal-svn
# Maintainer: Pierre Chapuis <catwell at archlinux dot us>
# NOTE: This package relies on Mplayer's configure script to detect what is
# useful on your system. Build it on the machine you will use it on.
# If some features don't work, install the related optdepends *before*
# building.
# Before reporting any bug, please download a fresh copy of the package from
# the AUR and build the package using makepkg (not Yaourt).
pkgname=mplayer-minimal-svn
View _django1.4.patch
--- _django.org 2012-06-16 23:48:07.256319726 +0900
+++ .compfunc/_django 2012-06-16 23:55:32.556331127 +0900
@@ -31,7 +31,6 @@
"cleanup:remove old data from the database"
"compilemessages:compile .po files to .mo for use with gettext"
"createcachetable:creates table for SQL cache backend"
- "createsuperuser:create a superuser"
"dbshell:run command-line client for the current database"
"diffsettings:display differences between the current settings and Django defaults"
"dumpdata:output contents of database as a fixture"
@axilleas
axilleas / grub.sh
Created Jan 25, 2013
Grub2 quick installation for new Archlinux installations
View grub.sh
#!/bin/env bash
# https://wiki.archlinux.org/index.php/GRUB2#Install_to_440-byte_MBR_boot_code_region
modprobe dm-mod
grub-install --target=i386-pc --recheck --debug /dev/sda
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
View jail.pl
#a/usr/bin/perl
# This script was hastily cobbled together for my own use. It can
# probably break your system. Use at your own risk.
$JAIL = "/srv/http";
$USER = "http";
$GROUP = "http";
$WWW_DIR = "www";
sub run{
@axilleas
axilleas / coordinate.py
Created Mar 30, 2013
Edx - 6.00x Lecture 10 Problem 7
View coordinate.py
class Coordinate(object):
def __init__(self,x,y):
self.x = x
self.y = y
def getX(self):
# Getter method for a Coordinate object's x coordinate.
# Getter methods are better practice than just accessing an attribute directly
return self.x