Skip to content

Instantly share code, notes, and snippets.

View beginor's full-sized avatar
💭
Coding for code!

beginor beginor

💭
Coding for code!
View GitHub Profile
REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial"="WenQuanYi Micro Hei"
"Comic Sans MS"="WenQuanYi Micro Hei"
"Courier"="WenQuanYi Micro Hei Mono"
"Courier New"="WenQuanYi Micro Hei Mono"
"Fixedsys"="WenQuanYi Micro Hei"
"Helv"="WenQuanYi Micro Hei"
"Helvetica"="WenQuanYi Micro Hei"
1. 生成keystore
注册在填写名子与姓氏时需要填写tomcat的主机ip地址
keytool -genkey -v -alias tomcat -keyalg RSA -keystore tomcat.keystore -validity 365
2. 准备生成 CA 的key
openssl genrsa -out myCA.key 2048
3. 生成 CA
openssl req -x509 -new -key myCA.key -out myCA.cer -days 730 -subj /CN="Sencloudx Custom CA"
4. 准备从 CA 请求认证的请求文件
keytool -certreq -alias tomcat -keystore tomcat.keystore -file server.csr
5. 从CA请求认证
@beginor
beginor / mac_ram_disk.sh
Created June 15, 2014 10:21
script create ramdisk on mac os x
if ! test -e /Volumes/\"Ramdisk\" ; then
diskutil erasevolume HFS+ \"RamDisk\" `hdiutil attach -nomount ram://$((2*1024*512))`
mkdir -p /Volumes/RamDisk/Caches
mkdir -p /Volumes/RamDisk/Logs
fi
@beginor
beginor / mysql-cursor-demo.sql
Created June 24, 2014 08:10
MySql Cursor Demo
DELIMITER $$
CREATE DEFINER=`udev`@`%` PROCEDURE `build_email_list`(INOUT email_list varchar(4000))
BEGIN
DECLARE v_finished INTEGER DEFAULT 0;
DECLARE v_email varchar(100) DEFAULT "";
-- declare cursor for employee email
DEClARE email_cursor CURSOR FOR
@beginor
beginor / sql-cursor-sample.sql
Last active August 29, 2015 14:02
Sql Server Cursor Sample
Use Northwind
Go
Declare @CatId Int, @CatName NvarChar(50)
Declare catCur Cursor For
Select c.CategoryId, c.CategoryName From Categories c
Open catCur
Fetch Next From catCur InTo @CatId, @CatName
// This sample will guide you through elements of the F# language.
//
// *******************************************************************************************************
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click
// and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu.
// *******************************************************************************************************
//
// For more about F#, see:
// http://fsharp.net
//
#!/bin/bash
#
#Usage:
#1.) Install cygwin and make sure you select the following packages:
#- gcc-mingw
#- pkg-config
#- mingw-zlib1
#- mingw-zlib-devel
#
#2.) Install the following Mono release package: "Mono for Windows, Gtk#, and XSP"
@beginor
beginor / uninstall-all-gems-osx.sh
Created October 16, 2014 06:27
uninstall all gems osx
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
require.config({
paths: {
/* other paths are omitted */
'bootstrap': '../libs/bootstrap'
},
shim: {
'bootstrap/affix': { deps: ['jquery'], exports: '$.fn.affix' },
'bootstrap/alert': { deps: ['jquery'], exports: '$.fn.alert' },
'bootstrap/button': { deps: ['jquery'], exports: '$.fn.button' },
'bootstrap/carousel': { deps: ['jquery'], exports: '$.fn.carousel' },