Skip to content

Instantly share code, notes, and snippets.

View gist:605c6cf28957753931615568340a330f
# 如果Framework中还需要使用资源文件,请将资源文件单独复制到一个bundle中,使用一个文件夹包含.framework和.bundle
# 在build/Release-iphoneos/${Target_Name}.framework下创建真机framework
xcodebuild -configuration Release -target "${Target_Name}" -sdk iphoneos clean build
# 在build/Release-iphonesimulator/${Target_Name}.framework下创建模拟器framework
xcodebuild -configuration Release -target "${Target_Name}" -sdk iphonesimulator
xdream86 /
Created Jul 16, 2017
# See /usr/share/postfix/ for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
Hi Oliver
Your solution is the simplest solution and that worked for me. Here's what i did
To start ufw on boot
Create a shell script
Sudo nano containing 2 lines
/usr/sbin/ufw enable
Ctrl-X to save it
sudo cp /etc/rc.local
To check:
xdream86 /
Created Dec 17, 2016 — forked from dominikwilkowski/
Ubuntu 16.04 setup with NGINX http/2 and letsencrypt


This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.


After creating the server (droplet on DigitalOcean) log in with

xdream86 / nginx.conf
Created Nov 28, 2016 — forked from turtlesoupy/nginx.conf
node.js upstream nginx config
View nginx.conf
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
xdream86 /
Created Nov 26, 2016 — forked from jimothyGator/
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
xdream86 / Dockerfile
Created Aug 8, 2016
View Dockerfile
File Edit Options Buffers Tools Help
FROM jenkins:2.7.1
USER root
RUN apt-get update \
&& curl -sL | bash \
&& apt-get install -y nodejs \
&& wget -qO- | sh \
&& apt-get install -y emacs
RUN npm install -g mocha
USER jenkins
View gist:9d3fc5ea3a5cb62b9ac46007929edac8
apt-get update
# docker
wget -qO- | sh
# compose
curl -L`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# emacs
sudo apt-get install emacs
xdream86 /
Created Jun 8, 2016 — forked from staltz/
The introduction to Reactive Programming you've been missing
xdream86 / iOSMapKitFitAnnotations.m
Created Dec 16, 2015 — forked from andrewgleave/iOSMapKitFitAnnotations.m
Zooms out a MKMapView to enclose all its annotations (inc. current location)
View iOSMapKitFitAnnotations.m
MKMapRect zoomRect = MKMapRectNull;
for (id <MKAnnotation> annotation in mapView.annotations) {
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate);
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0);
if (MKMapRectIsNull(zoomRect)) {
zoomRect = pointRect;
} else {
zoomRect = MKMapRectUnion(zoomRect, pointRect);