Skip to content

Instantly share code, notes, and snippets.

View xiangzhuyuan's full-sized avatar
🤗

Mathew P. Jones xiangzhuyuan

🤗
View GitHub Profile
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@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:

“即使你把你最好的都给了这个世界,可能还是远远不够... 无论如何,你还是要把你最好的给这个世界"

created at: 2015年2月10日 16:45

by: 罗永浩

界面的文章“隐形战友” http://weibo.com/5182171545/C2r5UzLPB 是这些年来罕见的一篇打动我的新闻报道,并不是因为我们有幸成为了 OpenSSL 的“战友”和这篇文章的最佳配角,而是因为这篇文章写得有血有肉、有理有据,并且带有分寸感良好的温度。在此之前,虽然我们已经捐助了 OpenSSL,并且也知道 OpenSSL 牛x,但不知道他们这么牛x。

这篇文章在网上发表后,我的老冤家、网红程序员霍炬很快写了一篇题为“到底谁才是真正的隐形战友——开源软件和 OpenSSL 的真实故事”的文章 http://weibo.com/5182171545/C33492lGs

@edvinasbartkus
edvinasbartkus / gist:0e99ea8305a20737f562
Last active May 20, 2022 11:08
Ruby puma.gem install on El Capitan / Mac Sierra
gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib
@yesnik
yesnik / response_example.rb
Created October 21, 2015 12:01
Ruby on Rails request.env variable content
# This is the content of variable request.env
# We get this content in controller:
# class BlogsController < ApplicationController
# def index
# render plain: "Response: #{ YAML::dump(request.env) }"
# end
# end
anonymous
anonymous / index.html
Created September 20, 2016 05:23
JS Bin // source http://jsbin.com/lekutu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/[email protected]/dist/redux.min.js"></script>
anonymous
anonymous / index.html
Created September 20, 2016 06:17
Redux basic example // source http://jsbin.com/kegofu
<!DOCTYPE html>
<html>
<head>
<title>Redux basic example</title>
<script src="https://npmcdn.com/redux@latest/dist/redux.min.js"></script>
</head>
<body>
<div>
<p>
Clicked: <span id="value">0</span> times