Skip to content

Instantly share code, notes, and snippets.

@xywei
xywei / startup.sh
Created May 24, 2017 03:06
Start Gitlab
#!/bin/sh
# Start the Gitlab docker image using docker-compose file here.
# This is a useful one-liner which will give you the full directory name of
# the script no matter where it is being called from.
GDATA_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$GDATA_DIR"/gitlab/
docker-compose up -d
@xywei
xywei / setup.sh
Created May 24, 2017 02:56
Setup symlinks for Gitlab
#!/bin/sh
# Make symlinks to allow Gitlab to pickup data here.
# This is a useful one-liner which will give you the full directory name of
# the script no matter where it is being called from.
GDATA_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
GLINK_DIR=~/.gitlab
if [ -d "$GLINK_DIR" ]; then
echo "$GLINK_DIR already exists! exiting .."
@xywei
xywei / docker-compose.yml
Created May 24, 2017 02:54
Docker compose configs for GitLab on USB drives
gitlab:
container_name: gitlab
image: gitlab/gitlab-ce:latest
hostname: gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://127.0.0.1:8050'
gitlab_rails['gitlab_shell_ssh_port'] = 522
ports:
- "8050:8050"
@xywei
xywei / prime_list.cpp
Last active September 6, 2016 01:45
Simple Prime Number Generator
// Include STL
#include <iostream>
#include <bitset>
#include <vector>
using namespace std;
template<int M>
void prime_list (vector<int> & list) {
list.clear();
bitset<M> s;
@xywei
xywei / rsync.log: setting LD_PRELOAD
Created November 19, 2015 03:17
rsync.log: setting LD_PRELOAD
4929:
4929: file=/(path-to-my-$HOME)/lib/libevent-2.0.so.5 [0]; needed by rsync [0]
4929: file=/(path-to-my-$HOME)/lib/libevent-2.0.so.5 [0]; generating link map
4929: dynamic: 0x00002b109a666320 base: 0x00002b109a420000 size: 0x0000000000247948
4929: entry: 0x00002b109a42c5d0 phdr: 0x00002b109a420040 phnum: 5
4929:
4929:
4929: file=libacl.so.1 [0]; needed by rsync [0]
4929: find library=libacl.so.1 [0]; searching
4929: search path=/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release/tls/x86_64:/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release/tls:/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release/x86_64:/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release:/opt/intel/Compiler/11.1/072/lib/intel64/tls/x8
@xywei
xywei / rsync.log: setting LD_LIBRARY_PATH
Created November 19, 2015 03:15
rsync.log: setting LD_LIBRARY_PATH
2766:
2766: file=libacl.so.1 [0]; needed by rsync [0]
2766: find library=libacl.so.1 [0]; searching
2766: search path=/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release/tls/x86_64:/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release/tls:/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release/x86_64:/(path-to-my-$HOME)/share/tbb44_20150728oss/build/linux_intel64_gcc_cc5.2.0_libc2.12_kernel2.6.32_release:/(path-to-my-$HOME)/lib/tls/x86_64:/(path-to-my-$HOME)/lib/tls:/(path-to-my-$HOME)/lib/x86_64:/(path-to-my-$HOME)/lib:/(path-to-my-$HOME)/lib64/tls/x86_64:/(path-to-my-$HOME)/lib64/tls:/(path-to-my-$HOME)/lib64/x86_64:/(path-to-my-$HOME)/lib64:/opt/intel/Compiler/11.1/072/lib/intel64/tls/x86_64:/opt/intel/Compiler/11.1/072/lib/intel64/tls:/opt/intel/Compiler/11.1/072/lib/intel64/x86_64:/opt/intel/Compiler/11.1/072/lib/intel64:/op