This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Graph.InstallCentOS", | |
"options": { | |
"defaults": { | |
"obmServiceName": "noop-obm-service" | |
}, | |
"install-os": { | |
"version": "7.0", | |
"repo": "{{api.server}}/centos/7/os/x86_64", | |
"rootPassword": "root", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Reference link: http://www.aboutdebian.com/proxy.htm | |
INTIF="eth1" | |
EXTIF="eth0" | |
/sbin/depmod -a | |
/sbin/modprobe ip_tables | |
/sbin/modprobe ip_conntrack | |
/sbin/modprobe ip_conntrack_ftp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015, EMC, Inc. | |
'use strict'; | |
module.exports = { | |
friendlyName: 'SKU Discovery', | |
injectableName: 'Graph.SKU.Discovery', | |
options: { | |
defaults: { | |
graphOptions: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var _ = require('lodash'); | |
var airbnb = require('eslint-config-airbnb'); | |
var yaml = require('js-yaml'); | |
function load(filename) { | |
console.log('load file ' + filename); | |
return require(filename); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"rules": { | |
"strict": [ | |
"error", | |
"never" | |
], | |
"import/no-unresolved": [ | |
"error", | |
{ | |
"commonjs": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
es6: true | |
node: true | |
parserOptions: | |
ecmaFeatures: | |
experimentalObjectRestSpread: true | |
generators: false | |
objectLiteralDuplicateProperties: false | |
ecmaVersion: 6 | |
sourceType: module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
"strconv" | |
"strings" | |
) | |
func ParseFloat(str string) (float64, error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET=/root/geoip | |
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz -O $TARGET/tmp.tar.gz | |
tar -xvzf GeoLite2-City.tar.gz -C $TARGET --strip-components 1 | |
rm $TARGET/tmp.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION jsonb_rename_keys( | |
jdata JSONB, | |
keys TEXT[] | |
) | |
RETURNS JSONB AS $$ | |
DECLARE | |
result JSONB; | |
len INT; | |
newkey TEXT; | |
oldkey TEXT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION jsonb_remove_keys( | |
jdata JSONB, | |
keys TEXT[] | |
) | |
RETURNS JSONB AS $$ | |
DECLARE | |
result JSONB; | |
len INT; | |
target TEXT; |
OlderNewer