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
@beginor
beginor / fix-geometries.py
Created April 13, 2021 00:05 — forked from jsanz/fix-geometries.py
Python - QGIS - Fix geometries
"""
Small script to fix geometries of the first file argument
using the native QGIS processing algorithm. You may need
to adjust the path to you installation.
"""
import sys
sys.path.append('/usr/share/qgis/python/plugins')
from processing.core.Processing import Processing
@beginor
beginor / cesium.d.ts
Created October 4, 2017 01:37 — forked from thw0rted/cesium.d.ts
Updated typings file for Cesium v1.37.0
/**
* Cesium type definitions
* For use with Cesium v1.37.0
* Created by Aigars Zeiza <https://github.com/Zuzon>
* Modified by Harry Nicholls <harry@northstar-robotics.com>
* Updated for v1.37.0 by James Bromwell <https://github.com/Thw0rted>
*/
declare module "cesium"{
type RenderState = any;
@beginor
beginor / systemjs.loader.dojo.js
Last active February 18, 2017 09:23 — forked from green3g/dojo.js
SystemJS Dojo Loader
exports.fetch = function(load) {
var name = load.name;
return new Promise(function(resolve) {
var dojoName = convertToDojoModule(name);
window.require([dojoName], function(mod) {
SystemJS.register(dojoName, [], function (exp, idObj) {
return {
setters: [],
execute: function() {
exp("default", mod);
@beginor
beginor / gist:ae55c9bbda7baa34b300c4b3b6bce920
Created October 15, 2016 03:39 — forked from tonymtz/gist:714e73ccb79e21c4fc9c
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
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' },
#!/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"
/****************************************************************************
* Author: Alberto Gutiérrez Jácome <agjacome@gmail.com>
* Date: 16/09/2012
*
* Compilation: javac KdTree.java
* Execution: not applicable
* Dependencies: Point2D.java RectHV.java StdDraw.java Queue.java
*
* Description: A mutable data type that uses a 2d-tree to represent a set of
* points in the unit square. A 2d-tree is a generalization of a BST to
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请求认证
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"
REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001