Skip to content

Instantly share code, notes, and snippets.

View digglife's full-sized avatar
🏠
Working from home

朱聖黎 Zhu Sheng Li digglife

🏠
Working from home
View GitHub Profile
@digglife
digglife / fixpoodlewin.pp
Last active August 29, 2015 14:24
Fix Poodle Vulnerability(Disable SSLv3) on Windows Servers with Puppet
# Disable SSLv3 on Windows.(POODLE vulnerability)
# https://technet.microsoft.com/en-us/library/security/3009008.aspx
registry_value { "Disable SSLv3 for IE":
path => 'HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\SecureProtocols',
ensure => present,
type => 'dword',
data => 128,
}
@digglife
digglife / ppdeploy.bat
Last active June 20, 2018 23:56
Batch Script for deploying puppet agent
@ECHO OFF
REM Get Administrator Privilege on Windows 6+
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
IF '%errorlevel%' NEQ '0' (
ECHO Requesting administrative privileges...
GOTO UACPrompt
) ELSE ( GOTO gotAdmin )
:UACPrompt
@digglife
digglife / zhnize.py
Last active April 11, 2016 00:35
fix language meta of chinese epubs in iBooks Library
# -*- coding: utf-8 -*-
from biplist import readPlist,writePlist
import re
import os.path
import xml.etree.ElementTree as et
def change_lang_zh(opf):
opftree = et.parse(opf)