Skip to content

Instantly share code, notes, and snippets.

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

luodaoyi luodaoyi

🏠
Working from home
  • Dalian Company
  • Marceleneport ,Idaho ,Fiji
View GitHub Profile
@fonsecas72
fonsecas72 / gist:0ef04265a3d0c5822e5d441b8d2de1f8
Created January 11, 2021 16:39
Installing polipo on ubuntu 20.04 20.10
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/polipo/polipo_1.1.1-8_amd64.deb
sudo dpkg -i polipo_1.1.1-8_amd64.deb
@caiorss
caiorss / CMakeLists.txt
Created November 27, 2020 14:05
QuickJS engine sample project - shows how to embedded in C++
cmake_minimum_required(VERSION 3.9)
project(QuickJS-Experiment)
#========== Global Configurations =============#
#----------------------------------------------#
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_VERBOSE_MAKEFILE ON )
set( CMAKE_CXX_EXTENSIONS OFF)
#!/bin/zsh
test -d ~/ntfs || mkdir ~/ntfs
disk=$(diskutil list external | grep -i NTFS | awk '{print $7}')
echo "umounting /dev/$disk"
sudo umount /dev/$disk
echo "mounting by read and write NTFS privileges..."
sudo mount -t ntfs -o rw,auto,nobrowse /dev/$disk ~/ntfs
@roylez
roylez / backup-db.sh
Created August 22, 2017 22:23
dokku postgres backupscript
#! /bin/bash
#
# to restore:
# gunzip XXX.db.gz
# dokku postgres:import <dbname> < XXX.db
# directory to save backups in, must be rwx by postgres user
BASE_DIR="/var/backups/postgres"
YMD=$(date "+%Y-%m-%d")
DIR="$BASE_DIR"
# Update & Upgrade the System
sudo apt-get update
sudo apt-get upgrade
# Install dependencies there might be more based on your system
# However below instructions are for the fresh Ubuntu install/server
# Please carefully watch the logs because if something could not be install
# You have to make sure it is installed properly by trying the command or that particular
# dependency again
@EvgenyOrekhov
EvgenyOrekhov / A simple Docker and Docker Compose install script for Ubuntu.md
Last active May 5, 2024 20:06
A simple Docker and Docker Compose install script for Ubuntu

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@waynegraham
waynegraham / notes.md
Created October 16, 2015 13:27
Capistrano deployment with Travis

Setup

On a development machine, install the Travis CLI gem and login. You'll then need to encrypt a password to decrypt the private key.

$ gem instal travis
$ travis login
$ travis encrypt DEPLOY_KEY="password for encryption" --add
@ouyangzhiping
ouyangzhiping / docker-gitlab.md
Last active July 20, 2021 08:14
docker-gitlab部署

docker用来隔离应用还是很方便的,一来本身的操作较为简单,二来资源占用也比虚拟机要小得多,三来也较为安全,因为像数据库这样的应用不会再全局暴露端口,同时应用间的通信通过加密和端口转发,更加安全。

Gitlab是目前比较流行的开源类Github代码管理平台。Gitlab使用Rails开发,使用PostgreSQL或MySQL数据库,Redis做缓存。一般自己搭建私有代码仓库,Gitlab通常是首选。这里简单介绍一下dockerized Gitlab。

Gitlab的docker镜像早已有人做好了,并且维护相当不错。大家可以前往其GitHub仓库了解该镜像的情况。官方repo的readme中已经有详细的安装配置方案,这里我简单的梳理一下部署流程。

安装Docker

这里以Ubuntu 14.04发行版为例,在bash中输入一下命令安装最新的docker: