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
##cut a video from 00:00:00 to 00:25:00 | |
ffmpeg -ss 00:00:00 -t 00:25:00 -i big-055.mp4 -acodec copy -vcodec copy 055.mp4 | |
## another command | |
ffmpeg -i in.mp4 -ss [start] -t [duration] -c:v copy -c:a copy out.mp4 |
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
{ | |
"imdbId": "tt0100935", | |
"title": "Wild at Heart", | |
"year": "1990", | |
"rating": "7.3", | |
"description": "Young lovers Sailor and Lula run from the variety of weirdos that Lula's mom has hired to kill Sailor.", | |
"cast": [ | |
"Nicolas Cage", | |
"Laura Dern", | |
"Willem Dafoe", |
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
if(!$scope.securityClassElementScope){ | |
var watcher1 = $scope.$watch(function(){ | |
return $element.find("#security-classes-multiple-search-and-select-edit-id").isolateScope(); | |
},function(val){ | |
if(val){ | |
watcher1(); | |
$scope.securityClassElementScope = val; | |
} | |
}) | |
} |
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 | |
# This batch created by follwed these documents | |
# 1. http://oracleflash.com/20/How-to-kill-all-processes-with-one-command-in-Linux.html | |
# 2. http://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/ | |
# | |
echo "Start restart jboss" | |
kill -9 `ps aux | grep jboss | awk '$NF ~/jboss-as-7.1.1/ {print $2}'` | |
echo "Stopped jboss. Relax in 3 seconds." | |
sleep 3 | |
echo "Start jboss" |
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"?> | |
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> | |
<display-name>xedu-mongodb-web</display-name> | |
<!-- Auto scan REST service --> | |
<context-param> | |
<param-name>resteasy.scan</param-name> | |
<param-value>true</param-value> | |
</context-param> | |
<context-param> | |
<param-name>resteasy.servlet.mapping.prefix</param-name> |
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
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>io.jsonwebtoken</groupId> | |
<artifactId>jjwt</artifactId> |
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
// call jboss-cli | |
jboss-cli.sh --connect controller=vntils11:9991 --command="deploy /root/.hudson/jobs/Xframework-SaaS-EJB/workspace/xframework-saas-ear/target/xframework-saas-ear-1.0.0.0-SNAPSHOT.ear" | |
//relax | |
sleep 60 | |
// copy to deployements | |
cp xframework-saas-ear/target/*ear /opt/jboss-as-7.1.1.Final/standalone/deployments/ | |
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
{ | |
"data": { | |
"distinguishedName": "CN=hr1,CN=Users", | |
"name": "hr1", | |
"certificateSerialNumber": null, | |
"companyName": "Apple Inc", | |
"secretAnswer": null, | |
"sendNewsLetter": null, | |
"unlockEmailCheckId": null, | |
"emergencyEmail": "2", |
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
# connect to mongodb with db name is xdsb | |
mongo xdsb | |
# show all collections | |
show collections() | |
# find by id | |
db.collection_name.find({_id:'id'}) |
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 top 5 rows | |
SELECT * FROM [framework_eventlog] WHERE [id] > (SELECT MAX([id]) - 5 FROM [framework_eventlog]); |