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
# move all jpg files to a location, the v option is verbose and prints a summary | |
find . -type f -name '2010*.jpg' -print0 | xargs -0 mv -v --target-directory=/p2sa/stage/realtime/swap/data/ | |
# do a count of files in a directory | |
find . -type f -name '2013_07*.jp2' | wc -l |
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
#Given a line like: | |
#2018-10-22 02:13:38,510 [pool-1-thread-1] [WARN ] [esac.archive.ssa.simport.file.SohoScienceFile] - File [20181021_0030_c3_512.jpg] being moved to [/ssa/sps/realtime/lasco/c3/2018/10] has size 0 | |
#To get something like: | |
#File [20181021_0030_c3_512.jpg] being moved to [/ssa/sps/realtime/lasco/c3/2018/10] has size 0. | |
grep "has size 0" ssa-dl-import.log | sed 's/^.*File/File/' |
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
rsync -avzhe ssh 2018/ user@mygreat.server.net:/path/where/to/go/to/ |
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
git diff --ignore-space-change temporary-branch master -- jersey/src/main/java/com/baeldung/jersey/server/model/Fruit.java |
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.cookybear.content.asset.factory | |
import com.cookybear.content.asset.Asset | |
import com.cookybear.content.asset.Story | |
object AssetFactory { | |
def factory(node: scala.xml.Node): Asset = { | |
val trimmedNode = scala.xml.Utility.trim(node) |
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
select count(*) from fb_match where startdate = 20101211 and competition_id in ('100','101','102','103','104','120') |
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
curl --cert /etc/pki/contentapi.pem --cacert /etc/ca.pem -H "Accept:application/json" -H "X-Candy-Audience:Domestic" -H "X-Candy-Platform:HighWeb" --write-out %{http_code} --silent --output /dev/null https://api.test.bbc.co.uk/content/asset/news/uk-england-16017024 |
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
svn changelist CONTENTAPI-630 src/main/resources/config/environment.properties src/main/resources/config/environments/dev.properties src/main/resources/config/environments/sandbox.properties src/main/resources/config/environments/stage.properties src/main/resources/config/environments/live.properties | |
520 svn status | |
521 svn diff src/main/resources/config/environment.properties | |
522 svn status | |
523 svn commit --changelist CONTENTAPI-630 -m "CONTENTAPI-630 - Temporarily disable XA transations for Content API" |
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
require "base64" | |
def create_big_picture | |
"<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\"http://www.w3.org/2005/08/addressing\"> | |
<s:Header> | |
<a:Action s:mustUnderstand=\"1\">http://schemas.news.bbc.co.uk/CPS/Sombrero/ICPSService/ICPSService/GetAsset</a:Action> | |
<a:MessageID>urn:uuid:5de50599-fc90-4bba-9ff9-ba19fe4a66bc</a:MessageID> | |
<a:SequenceAcknowledgement> | |
<a:ReplyTo>http://www.w3.org/2005/08/addressing/anonymous</a:ReplyTo> | |
</a:SequenceAcknowledgement> |
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
import javax.ws.rs.core.Response; | |
import org.apache.cxf.jaxrs.ext.ResponseHandler; | |
import org.apache.cxf.jaxrs.model.OperationResourceInfo; | |
import org.apache.cxf.message.Message; | |
public class HttpResponseVersionProvider implements ResponseHandler { | |
public static final String VERSION_HEADER = "X-API-Version"; | |
NewerOlder