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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.whitesource</groupId> | |
<artifactId>log4j-netty-sample</artifactId> | |
<version>1.0-SNAPSHOT</version> |
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
function onOpen() | |
{ | |
var menuEntries = [{name: "Go to Cell", functionName: "goToCell"}, {name: "Go to Row", functionName: "goToRow"},{name: "Go to 1st empty Row", functionName: "selectFirstEmptyRow"}]; | |
SpreadsheetApp.getActiveSpreadsheet().addMenu("MyUtils", menuEntries); | |
} | |
function goToCell() | |
{ | |
var strRange = Browser.inputBox("Insert the required cell (e.g.: B351):", Browser.Buttons.OK_CANCEL); | |
if(strRange != "cancel") |
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
# group groups grouping regular expressions regex regexp | |
sed -e "s+\(.*\)\(, .*$\)+\1+g" | |
export x="00:00:52.76, start" | |
export y=`echo $x | sed -e "s+\(.*\)\(, .*$\)+\1+g"` | |
echo -${y}- | |
# Output : | |
#-00:00:52.76- |
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/bash | |
clear | |
dbName="partner" | |
# all tables | |
tableNames=(alembic_version customers dynamic global_id logins products random_ascii resource_cache resources static_content variables) | |
# only relevant tables | |
tableNames=(customers dynamic products) |
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/bash | |
if [ $# -lt 1 ]; then | |
echo "Error: Missing deployment name/id" | |
echo " Usage: $0 deployments_id" | |
exit | |
fi | |
deploymentName=$1 | |
clear |
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/bash | |
clear | |
# Install this 1st : | |
# sudo apt install subtitleripper | |
cd ~/tmp/test1005 | |
export rawTotalSrt="rawTotal.srt" | |
export totalSrt="total.srt" |
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
# Prior to using this code, you need to run : pip install netaddr | |
from netaddr import * | |
from netaddr import iter_iprange | |
def is_in_subnet(input_addr, subnet_addr, subnet_mask): | |
current_subnet_str = '{0}/{1}'.format(subnet_addr, subnet_mask) | |
curr_subnet = IPNetwork(current_subnet_str) | |
for curr_ip in curr_subnet: |
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
[ | |
{ | |
"product_type": "CPE", | |
"siebel_customer_id": "1-1X9Y-364", | |
"extra_fields": { | |
"Site": "Jerusalem" | |
}, | |
"siebel_asset_id": "123741", | |
"product_serial_id": "994465", | |
"product_name": "ONE ISP Vtech LAD 303 (Orange) Smart Box" |
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
function onOpen() | |
{ | |
var menuEntries = [{name: "Go to", functionName: "goToCell"}]; | |
SpreadsheetApp.getActiveSpreadsheet().addMenu("MyUtils", menuEntries); | |
} | |
function goToCell() | |
{ | |
var strRange = Browser.inputBox("Insert the required cell (e.g.: B351):", Browser.Buttons.OK_CANCEL); | |
if(strRange != "cancel") |
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/bash | |
for routerID in `neutron router-list | grep -viE "cfy|management|mngmnt|--|external_gateway_info|composer|cloudify" | awk -F\| '{ print $2}' | sed 's/ //g'`; do | |
echo " xxx routerID is $routerID" | |
export subnetID=`neutron router-port-list $routerID | grep -viE "cfy|management|fixed_ips|--|composer|cloudify" | awk -F\| '{print $5}' | awk -F: '{print $2}' | awk -F, '{print $1}' | sed -e 's/[" ]//g'` | |
echo " xxx subnetID is $subnetID" | |
for portIDFloating in `neutron floatingip-list | awk -F\| '{ print $5 }' | sed 's/ //g' | grep "-" | grep -v "port"`; do | |
echo " xxx portIDFloating is $portIDFloating" | |
export portInSubnet=`neutron port-list -c id -c fixed_ips | grep $subnetID | grep -c "${portIDInFloating}"` | |
echo " xxx portInSubnet is $portInSubnet" |
NewerOlder