Skip to content

Instantly share code, notes, and snippets.

@danshan
danshan / OmegaOptions.bak
Created June 19, 2022 05:18
OmegaOptions.bak
{"+auto switch":{"color":"#99dd99","defaultProfileName":"direct","name":"auto switch","profileType":"SwitchProfile","revision":"17fd8ef71dd","rules":[{"condition":{"conditionType":"HostWildcardCondition","pattern":"*"},"profileName":"proxy"}]},"+proxy":{"bypassList":[{"conditionType":"BypassCondition","pattern":"127.0.0.1"},{"conditionType":"BypassCondition","pattern":"::1"},{"conditionType":"BypassCondition","pattern":"localhost"},{"conditionType":"BypassCondition","pattern":"*.nioint.com"},{"conditionType":"BypassCondition","pattern":"*.nevint.com"},{"conditionType":"BypassCondition","pattern":"*.nio.com"},{"conditionType":"BypassCondition","pattern":"*.niohome.com"}],"color":"#99ccee","fallbackProxy":{"host":"127.0.0.1","port":6152,"scheme":"http"},"name":"proxy","profileType":"FixedProfile","revision":"17fde084ec6"},"+proxyman":{"bypassList":[{"conditionType":"BypassCondition","pattern":"127.0.0.1"},{"conditionType":"BypassCondition","pattern":"[::1]"},{"conditionType":"BypassCondition","pattern":"localho
/**
* Phoenix
* doc: https://github.com/kasper/phoenix/wiki
* Global settings
*/
/**
* Preferences
*/
Phoenix.set({
@danshan
danshan / .gitignore
Created June 13, 2020 09:01
通用 .gitignore
# Mac
._*
.DS_Store
.Spotlight-V100
.Trashes
# Windows
Thumbs.db
Desktop.ini
@danshan
danshan / Clearness Dark.css
Created April 23, 2018 06:20
css for markdown
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
@danshan
danshan / jquery-tapir.js
Created April 23, 2018 06:16
jquery-tapir.js
(function($) {
var el;
var settings = {};
var methods = {
init: function(options) {
el = this;
settings = {
token: false,
query_param: 'query'
};
@danshan
danshan / MD5Digest
Created April 23, 2018 06:13
MD5Digest
package com.shanhh.md5tools;
import java.io.UnsupportedEncodingException;
//实现MD5算法的类,提供一个静态的函数toMD5()供调用;
//还提供一个getMD5ofStr()函数生成一个MD5加密串;
public class MD5Digest {
static final int S11 = 7;
static final int S12 = 12;
static final int S13 = 17;
static final int S14 = 22;
@danshan
danshan / gitinfo.sh
Created April 23, 2018 06:09
show git info like 'svn info'
#!/bin/sh
#pushd . >/dev/null
# Find base of git directory
while [ ! -d .git ] && [ ! `pwd` = "/" ]; do cd ..; done
# Show various information about this git directory
if [ -d .git ]; then
echo "== Remote URL: `git remote -v`"
@danshan
danshan / .tmux.conf
Created February 6, 2016 18:01
.tmux.conf
#-- base --#
set -g prefix C-a
unbind C-b
set -g default-terminal "screen-256color"
set -g display-time 3000
set -g history-limit 10000
set -g base-index 1
set -g pane-base-index 1
@danshan
danshan / .phoenix.js
Created February 6, 2016 17:58
phoenix
/**
* Phoenix
* doc: https://github.com/jasonm23/phoenix/wiki/JavaScript-API-documentation
*
* Global Settings
*/
var mash = ["alt"];
var mashShift = ["alt", "shift"];
var mashCtrl = ["alt", "ctrl"];
@danshan
danshan / Action.java
Last active December 31, 2015 07:11
Java Code Examples for org.apache.directory.shared.ldap.model.message.ModifyDnRequestImpl
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<ModifyDnRequestDecorator> container){
ModifyDnRequest internalModifyDnRequest=new ModifyDnRequestImpl();
internalModifyDnRequest.setMessageId(container.getMessageId());
ModifyDnRequestDecorator modifyDnRequest=new ModifyDnRequestDecorator(container.getLdapCodecService(),internalModifyDnRequest);
container.setMessage(modifyDnRequest);
LOG.debug("ModifyDn request");
}