Skip to content

Instantly share code, notes, and snippets.

View wowgeeker's full-sized avatar
🤓
Find Gold Mine

Matthew wowgeeker

🤓
Find Gold Mine
View GitHub Profile
@wowgeeker
wowgeeker / docker-install.md
Created December 15, 2024 06:22 — forked from ebta/docker-install.md
Installing docker (latest version) on Ubuntu 20.04

Installing docker on Ubuntu 20.04 / 22.04

Full reference here: https://docs.docker.com/engine/install/ubuntu/

Setup the repository

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

Add Docker’s official GPG key:

@wowgeeker
wowgeeker / rocksdb_centos.sh
Created March 14, 2022 12:26 — forked from srimaln91/rocksdb_centos.sh
Install RocksDB in CentOS7
#!/bin/bash
set -ex
ROCKSDB_VERSION="5.18.4"
ZSTD_VERSION="1.1.3"
yum update -y && yum install epel-release -y
yum install -y \
wget \
@wowgeeker
wowgeeker / go-install.sh
Created February 21, 2022 03:09 — forked from ssandeep/go-install.sh
Go Installer
#!/bin/bash
set -e
VERSION="1.17"
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
[ -z "$GOPATH" ] && GOPATH="$HOME/go"
OS="$(uname -s)"
ARCH="$(uname -m)"
# -*- coding:utf-8 -*-
import datetime
d1 = datetime.datetime(2018, 3, 21)
d2 = datetime.datetime(2018, 5, 20)
d3 = datetime.datetime(2018, 6, 11)
dd1 = (d2-d1).days
dd2 = (d3-d2).days
# 3月是4户交钱
price1_per_day = 400.0/dd1/4
@wowgeeker
wowgeeker / UnityAssetBundleBuilder.cs
Created October 14, 2017 07:11 — forked from tkyaji/UnityAssetBundleBuilder.cs
[Unity] Build Asset Bundle, and upload to AWS-S3
using UnityEngine;
using UnityEngine.Networking;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System;
@wowgeeker
wowgeeker / WeixinDetection.js
Created November 7, 2016 08:07 — forked from anhulife/WeixinDetection.js
判断网页是否是在微信内嵌浏览器中打开
document.addEventListener('WeixinJSBridgeReady', function(){
//如果执行到这块的代码,就说明是在微信内部浏览器内打开的.
alert('当前页面在微信内嵌浏览器中打开!');
});
@wowgeeker
wowgeeker / status_machine_demo.py.py
Created June 2, 2016 05:07
status_machine_demo.py
# -*- coding:utf-8 -*-
import datetime
import re
class EndType:
INNER = 1
OUTER = 2
@wowgeeker
wowgeeker / gist:db86694aa73287dfa5e1
Created October 29, 2015 07:07 — forked from dziobas/gist:5848891
Sample maven settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@wowgeeker
wowgeeker / deployerConfigContext.xml
Created October 28, 2015 11:00 — forked from serac/deployerConfigContext.xml
CAS LDAP Configuration for Active Directory
<bean id="ldapAuthenticationHandler"
class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="sAMAccountName"
c:authenticator-ref="authenticator">
<property name="principalAttributeMap">
<map>
<!--
| This map provides a simple attribute resolution mechanism.
| Keys are LDAP attribute names, values are CAS attribute names.
| Use this facility instead of a PrincipalResolver if LDAP is
@wowgeeker
wowgeeker / deployerConfigContext.xml
Created October 28, 2015 11:00 — forked from serac/deployerConfigContext.xml
CAS LDAP Configuration for Directory Supporting Direct Bind
<bean id="ldapAuthenticationHandler"
class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="uid"
c:authenticator-ref="authenticator">
<property name="principalAttributeMap">
<map>
<!--
| This map provides a simple attribute resolution mechanism.
| Keys are LDAP attribute names, values are CAS attribute names.
| Use this facility instead of a PrincipalResolver if LDAP is