Skip to content

Instantly share code, notes, and snippets.

View smartree's full-sized avatar

JasonSmartree smartree

View GitHub Profile
@smartree
smartree / GIT_HACKS.md
Created June 4, 2019 08:25 — forked from bzon/GIT_HACKS.md
GIT_HACKS

Common Git hacks

Rebasing develop branch from the latest changes of master branch.

git clone http://projectA.git -b develop
git pull --rebase origin master
# Resolve merge conflicts
git add <the resolved files>
git rebase --continue
git commit -m "Merged from master branch" # or git commit --amend -m "Overwriting the current commit"
@smartree
smartree / chatserver.js
Created June 4, 2019 08:25 — forked from bzon/chatserver.js
NodeJS Chat Server
const net = require('net');
const sockets = [];
const server = net.Server((socket) => {
sockets.push(socket);
socket.on('data', (data) => {
for (let i=0; i < sockets.length; i++) {
sockets[i].write(data);
}

Issue 1 - ADCFGCLONE completes for Application Server but Autoconfig fails

Problem

Sample errors that can be found at the bottom of $INST_TOP/admin/log/ApplyAppsTier_xxxx.log

[AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
@smartree
smartree / StrongSWAN L2TP IPsec RSA Hybrid 全类型配置
Created June 29, 2018 11:50
All VPN Type for Android client ipsec.conf
目前Android手机常见VPN连接支持类型:
PPTP
L2TP/IPsec PSK
L2TP/IPsec RSA #比较特别
IPsec Xauth PSK
IPsec Xauth RSA
IPsec Hybrid RSA
cat > /usr/local/etc/ipsec.conf<<-EOF
config setup
@smartree
smartree / L2TP IPsec RSA
Last active June 29, 2018 11:57 — forked from konosukef/chap-secrets
L2TP/IPsec RSA
安卓手机目前常见支持的VPN连接模式:
PPTP
L2TP/IPsec PSK
L2TP/IPsec RSA 本gist涉及的目标配置
IPsec Xauth PSK
IPsec Xauth RSA
https://www.strongswan.org/testing/testresults/ikev1/index.html
https://www.strongswan.org/testing/testresults/all.html
https://www.strongswan.org/testing/testresults/
@smartree
smartree / simple-https-server.py
Last active June 29, 2018 11:27 — forked from dergachev/simple-https-server.py
SIMPLE HTTPS SERVER
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl