Skip to content

Instantly share code, notes, and snippets.

View alswl's full-sized avatar

Jingchao alswl

View GitHub Profile
@alswl
alswl / repositories
Last active January 1, 2025 07:35
sbt repositories in China(mirror)
[repositories]
local
huaweicloud-ivy: https://mirrors.huaweicloud.com/repository/ivy/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
huaweicloud-maven: https://mirrors.huaweicloud.com/repository/maven/
bintray-typesafe-ivy: https://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
bintray-sbt-plugins: https://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
# aliyun not works for ivy
# aliyun-ivy: https://maven.aliyun.com/repository/public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
# aliyun-public-mirror: https://maven.aliyun.com/repository/public/
@alswl
alswl / index.html
Last active February 10, 2019 03:48
dijingchao.com/index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv=Content-Type content="text/html;charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>一个编程笔记</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style>
/* Sticky footer styles
@alswl
alswl / basic-auth.xml
Created December 25, 2018 13:33
spring basic auth for HTTP bean configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd">
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
<constructor-arg ref="httpClientFactory" />
<property name="messageConverters">
DROP TABLE IF EXISTS dept;
DROP TABLE IF EXISTS salgrade;
DROP TABLE IF EXISTS emp;
CREATE TABLE salgrade(
grade int(4) not null primary key,
losal decimal(10,2),
hisal decimal(10,2));
CREATE TABLE dept(
@alswl
alswl / arch-docker-fox.md
Created September 3, 2018 11:01
arch-docker-fox.md

Build Foxone in Docker

Docker start in macOS:

docker-machine start default
eval $(docker-machine env default)
@alswl
alswl / .gitignore
Last active July 3, 2018 08:06
gitignore
We couldn’t find that file to show.
digraph G {
compound = true;
fontsize = 14;
margin = "0,0";
ranksep = 0.2;
nodesep = 0.5;
penwidth = 0.5;
colorscheme = spectral7;
XML_URL=`c Casks/cctalk.rb G appcast | awk -F "'" '{print $2}'`
XML_SHA256=`curl -s $XML_URL | gsha256sum`
PUBDATE=`curl -s $XML_URL | xmlstarlet sel -t -v '//pubDate' | awk '{print $1}'`
VERSION=`curl -s $XML_URL | xmlstarlet sel -t -v '//title' | awk '{print $2}'`
BUILD=`curl -s $XML_URL | xmlstarlet sel -t -v '//sparkle:version'`
VERSION_ALL="$VERSION-$BUILD,$PUBDATE"
sed -i "s/version .*/version '$VERSION_ALL'/" Casks/cctalk.rb
sed -i "s/sha256 .*/sha256 ''/" Casks/cctalk.rb
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/conf
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
LOGS_FILE=`sed '/dubbo.log4j.file/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
@alswl
alswl / foo.py
Last active November 22, 2017 10:07
大吉大利,晚上吃鸡
# echo "V2loYWx1bm9mdW5jaWhtISBTaW8gYWluIGNuISBXZnVjZyBzaW9sIGpsY3R5IHFjbmIgc2lvbCB1ZmFpbGNuYmc6IDU5NTkyMjY4LiBCaWp5IGNuIGNtIGhpbiB4aWh5IHZzIGJ1aHguIE5idW4gY20gcWJzIHF5IGJ1cHkgd2lnam9ueWxtIHVoeCBVQy4gSGlxIG9teSBuYnkgZXlzIG5pIHV3d3ltbSBCQ0ZGIFVDIG15bHBjd3k6IHh5dnV5eTR1enp2eXV2dTkwOXUxODQwNjY5ODF4NTV1Lg==" | base64 -D
raw = 'Wihalunofuncihm! Sio ain cn! Wfucg siol jlcty qcnb siol ufailcnbg: 59592268. Bijy cn cm hin xihy vs buhx. Nbun cm qbs qy bupy wigjonylm uhx UC. Hiq omy nby eys ni uwwymm BCFF UC mylpcwy: xyvuyy4uzzvyuvu909u184066981x55u.'
for i in raw:
if i >= 'a' and i <= 'z':
print(chr((ord(i) + 6 - ord('a')) % 26 + ord('a')), end='')
elif i >= 'A' and i <= 'Z':
print(chr((ord(i) + 6 - ord('A')) % 26 + ord('A')), end='')
else: