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
# add this snippet in your .bashrc and enjoy a green foreground color, | |
# with HH:MM time info, plus directory and git data on a directory that | |
# has git information (git repo) | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# parse and create the prompt | |
function parse_git_branch { |
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 | |
# | |
# lvsbackup.sh - backup a mongo secondary by rsync/tgz | |
# | |
# LICENSE | |
# | |
# Copyright (c) 2013, Thanos Angelatos [email protected] | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without |
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
mongo localhost:27018 | |
MongoDB shell version: 2.4.3 | |
connecting to: localhost:27018/test | |
dev-mcs-01:SECONDARY> serverIsLocked = function () { | |
... var co = db.currentOp(); | |
... if (co && co.fsyncLock) { | |
... return true; | |
... } | |
... return false; | |
... } |
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
Tue Jun 25 11:41:08 [conn757] command PRD01_UCS_ROLLUPS.$cmd command: { distinct: "OutboundMessage", key: "eventId", query: { status: "DELIVERED", lastUpdateDate: { $gte: new Date(1372130940000), $lt: new Date(1372159560000) } } } ntoreturn:1 keyUpdates:0 numYields: 192015 locks(micros) r:1664868415 reslen:154 844300ms | |
Tue Jun 25 11:44:05 [conn757] command PRD01_UCS_ROLLUPS.$cmd command: { aggregate: "OutboundMessage", pipeline: [ { $match: { domain.$id: 141, status: "DELIVERED", lastUpdateDateOrig: { $gte: new Date(1372130940000), $lt: new Date(1372159560000) } } }, { $project: { campaignId: true, stepId: true, eventId: true, messageResourceId: true, segmentId: true, receivedDate: "$receivedDateNorm" } }, { $group: { _id: { campaignId: "$campaignId", stepId: "$stepId", eventId: "$eventId", messageResourceId: "$messageResourceId", segmentId: "$segmentId", receivedDate: "$receivedDate" }, count: { $sum: { $const: 1 } } } } ], fromRouter: true } ntoreturn:1 keyUpdates:0 locks(micros) r:107722 reslen:50 107ms | |
Tu |
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 com.ericsson.sm.core.smpp.internal; | |
import java.util.Random; | |
import com.cloudhopper.commons.charset.CharsetUtil; | |
import com.cloudhopper.smpp.SmppConstants; | |
import com.cloudhopper.smpp.SmppSession; | |
import com.cloudhopper.smpp.pdu.SubmitSm; | |
import com.cloudhopper.smpp.type.Address; |
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 | |
# sample code demonstrating a pattern search with SCAN | |
# using a COUNT "work intent" | |
if [ $# -ne 3 ] | |
then | |
echo "Find matching a pattern using SCAN " | |
echo "Usage: $0 <host> <port> <pattern>" | |
exit 1 |
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 | |
## the following line connects to REDIS @ DB:10 and creates 20M keys | |
## to reproduce the bug, compile and run the spring boot project attached here | |
## | |
redis-cli -h localhost -n 10 -n 10 "DEBUG" "POPULATE" "20000000" | |
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 | |
# | |
# A quick-and-dirty UPS shutdown monitor by Thanos | |
# | |
# Can perform shutdown of a "precious" machine that is on a UPS | |
# based on network reachability of a "inexpensive" machine that is | |
# not on a UPS. In my case, the "inexpensive" is a RPI that is always on. | |
# | |
# Cron entry for this script (uses "pi" user): | |
# */2 * * * * /home/pi/check-power.sh > /home/pi/powercheck.log 2>&1 |
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 | |
## Available to all; taken from https://github.com/NMichas/icinga-speedport2i - slight mods | |
## to work with Zabbix 3.4 | |
## | |
## -h (hostname) Mandatory. script does not work without. | |
## if no other parameter is provided, a summary with all values is given. | |
## | |
## each of the other parameters calls it again grepping the particular value. | |
# Gather command-line parameters. |
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"?> | |
<zabbix_export> | |
<version>2.0</version> | |
<date>2017-12-27T13:49:57Z</date> | |
<groups> | |
<group> | |
<name>Templates</name> | |
</group> | |
</groups> | |
<templates> |
OlderNewer