Skip to content

Instantly share code, notes, and snippets.

View omps's full-sized avatar

Om Prakash Singh omps

View GitHub Profile
@omps
omps / gist:e8f2e8f26267f241048a
Created March 2, 2016 09:11
org-capture and time clocking misbehaving
Org-mode version 8.3.3 (8.3.3-51-g30bcff-elpa). Before the update, it was already working on my Emacs 24.4 (Linux OS, built from sources), thanks to the answer from user2053036.
Looks like the extra parameter is no longer needed in this version. My working init file now looks like:
(defun bh/remove-empty-drawer-on-clock-out ()
(interactive)
(save-excursion
(beginning-of-line 0)
(org-remove-empty-drawer-at (point))))
Introduction
xrdp is a Remote Desktop Protocol (RDP) Server, allowing RDP clients to be presented an X windows desktop to the user.
Setup
First install xrdp:
sudo apt-get -y install xrdp
Next, change the encryption level to high from the default low:
sudo nano /etc/xrdp/xrdp.ini
$ sudo yum install curl-devel expat-devel gettext-devel \
openssl-devel perl-devel zlib-devel
$ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
$ sudo yum install asciidoc xmlto docbook2X
$ sudo apt-get install asciidoc xmlto docbook2x
$ sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
You can get it via the Kernel.org site, at https://www.kernel.org/pub/software/scm/git, or the mirror on the GitHub web site, at https://github.com/git/git/releases.
@omps
omps / xrdp_rhel_centos_6.md
Created March 3, 2016 05:20 — forked from dduvnjak/xrdp_rhel_centos_6.md
Setting up xrdp on RHEL 6

1 - Install the prerequisites for building and installation

yum groupinstall Desktop -y
yum install finger cmake patch gcc make autoconf libtool automake pkgconfig openssl-devel gettext file pam-devel libX11-devel libXfixes-devel libjpeg-devel
yum install flex bison gcc-c++ libxslt perl-libxml-perl xorg-x11-font-utils tigervnc-server git -y
reboot

2 - Get the latest source from the xrdp git repo, build and install

git clone git://github.com/FreeRDP/xrdp.git
http://serverfault.com/questions/575836/what-access-rights-could-be-blocking-access-to-a-gitlab-repository
@omps
omps / gist:fdb653d12e78f2d6d604
Created March 8, 2016 07:13
Storing Git data in an alternative directory
y default, omnibus-gitlab stores the Git repository data under /var/opt/gitlab/git-data. The repositories are stored in a subfolder repositories. You can change the location of the git-data parent directory by adding the following line to /etc/gitlab/gitlab.rb.
git_data_dir "/mnt/nas/git-data"
Note that the target directory and any of its subpaths must not be a symlink.
Run sudo gitlab-ctl reconfigure for the change to take effect.
If you already have existing Git repositories in /var/opt/gitlab/git-data you can move them to the new location as follows:
@omps
omps / README.md
Created March 8, 2016 10:05 — forked from radmen/README.md
Apache vhost config for gitlab

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_balancer
@omps
omps / rpm-from-source.sh
Last active March 10, 2016 09:46 — forked from fernandoaleman/rpm-from-source.sh
How to create an RPM from source with spec file
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild
@omps
omps / archlinux pacman commands.md
Created March 11, 2016 14:57
Arch Linux pacman cmds

pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. This command can synchronize the repository databases and update the system's packages (excluding "local" packages that are not in the configured repositories):

# pacman -Syu

Querying package databases

pacman queries the local package database with the -Q flag; see:

$ pacman -Q --help
@omps
omps / vagrantvirtualbox.md
Created March 12, 2016 02:27
Starting vagrant and virtualbox

up vote 157 down vote

When you are stuck with your vagrant machine the way described above there is no need to boot in gui mode (and is impossible without an X server).

While your VM is booting, in a separate terminal window, just find out the id of the running machine.

vboxmanage list runningvms