#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
function cd.() { | |
# 检查 Finder 是否执行 | |
if [ "`osascript -e 'tell application "System Events" to "Finder" is in (get name of processes)'`" = "true" ]; then | |
# 检查当前状态是否可以获取路径 | |
if [ "`osascript -e 'tell application "Finder" to get collapsed of front window' 2>/dev/null`" != "false" ]; then | |
if [ "`osascript -e 'tell application "System Events" to "TotalFinderCrashWatcher" is in (get name of processes)'`" = "true" ];then | |
# Unofficial brew formula for proxychains 4 | |
# Instruction: | |
# $ git clone git://gist.github.com/3792521.git gist-3792521 | |
# $ brew install --HEAD gist-3792521/proxychains4_formula.rb | |
# | |
# The default config file will be located in /usr/local/etc/proxychains.conf | |
# | |
require 'formula' | |
class Proxychains < Formula |
##Twitter for Andriod
key: 3nVuSoBZnx6U4vzUxf5w
secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
##Twitter for iPhone
key: IQKbtAYlXLripLGPWd0HUA
secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
server | |
{ | |
listen 443; | |
server_name twitter-api.vii.im api.twitter.com; | |
ssl on; | |
ssl_certificate /etc/nginx/certs/vii.im.crt; | |
ssl_certificate_key /etc/nginx/certs/vii.im.key; | |
location / { |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.