Skip to content

Instantly share code, notes, and snippets.

View wuhuizuo's full-sized avatar
🎯
Focusing

wuhuizuo

🎯
Focusing
  • PingCAP
  • ShenZhen
  • 06:25 (UTC +08:00)
View GitHub Profile
import javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration
import jenkins.model.GlobalConfiguration
// disable Job DSL script approval
GlobalConfiguration.all().get(GlobalJobDslSecurityConfiguration.class).useScriptSecurity=false
GlobalConfiguration.all().get(GlobalJobDslSecurityConfiguration.class).save()
@wuhuizuo
wuhuizuo / gist:da79d6cb832256666c5b
Created July 10, 2014 17:31
sublime text licence
----- BEGIN LICENSE -----
Alexander
Single User License
EA7E-814345
51F47F09 4EAB1285 7827EFF0 8B1207DC
A76A6EA3 E1A1CA7A DC1F2703 14,897,784
8EDC1C82 3F2A58B9 1C0C8B24 67686432
281245B3 6233DE5C ADC5C2F9 61FB8A04
171B63EF 86BA423F 6AC884FD 3273A7AA
5F50A6DB CE7859AE D62D2B37 AEEDD8C2
@wuhuizuo
wuhuizuo / gist:11087142
Created April 19, 2014 15:10
Hash的深层merge
class Hash
def deep_merge!(other_hash)
other_hash.each_pair do |k, v|
tv = self[k]
self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v
end
self
end
def deep_merge(other_hash)