Skip to content

Instantly share code, notes, and snippets.

View vanduc1102's full-sized avatar
🐛
💯 💯 💩 😆 🐢

Duke Nguyen vanduc1102

🐛
💯 💯 💩 😆 🐢
View GitHub Profile
{
"data": {
"distinguishedName": "CN=hr1,CN=Users",
"name": "hr1",
"certificateSerialNumber": null,
"companyName": "Apple Inc",
"secretAnswer": null,
"sendNewsLetter": null,
"unlockEmailCheckId": null,
"emergencyEmail": "2",
@vanduc1102
vanduc1102 / mongodb-basic-command.sh
Created January 8, 2016 09:34
MongoDB Basic Commands
# connect to mongodb with db name is xdsb
mongo xdsb
# show all collections
show collections()
# find by id
db.collection_name.find({_id:'id'})
@vanduc1102
vanduc1102 / lampp-setup.sh
Last active February 1, 2016 16:32
lampp setup on linux ubuntu 64 01-Feb-2016
ducnguyen@asus-K42JE:~/Downloads$ sudo /opt/lampp/lampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
/opt/lampp/share/xampp/checkapache: line 41: /opt/lampp/htdocs/xampp/.htaccess: No such file or directory
cp: cannot stat ‘/opt/lampp/htdocs/xampp/.htaccess’: No such file or directory
cp: cannot stat ‘/opt/lampp/htdocs/xampp/.htaccess’: No such file or directory
chmod: cannot access ‘/opt/lampp/htdocs/xampp/.htaccess’: No such file or directory
@Test
public void calendarSelectionTest() throws InterruptedException {
WebDriverWait wait = new WebDriverWait(driver, 10);
// Open first selectBox
WebElement checkBoxElement = driver.findElement(By.id("list_plans_1SelectBoxItContainer"));
checkBoxElement.click();
// select 3 people
WebElement itemElement3 = driver
.findElement(By.xpath(".//*[@id='list_plans_1SelectBoxItOptions']/li[4]/a/span[2]"));
@vanduc1102
vanduc1102 / link.html
Last active May 31, 2016 10:40
linktest
package com.examples.seleniumrc.util;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class ElementHelperSingleton {
private WebDriver driver;
private static ElementHelperSingleton elementHelperSingleton;
@vanduc1102
vanduc1102 / datasend.json
Created June 10, 2016 12:56
Create new Company
{"id":6190,"name":"ductest-vethoi","currency":{"code":"CHF"},"branchs":[{"description":"ductest-vethoi","currency":{"code":"CHF"},"isMainBranch":true,"contactTitle":{"code":""},"contactFirstName":"","contactLastName":"","professionals":[]}],"numberOfHours":12,"trialPeriodDuration":12,"hasThirteenthPayment":false,"numberOfHoursFrequency":{"code":"H"},"hiddenFilters":[],"insurances":[],"identifiers":[],"chargeCenters":[],"externalRefs":[],"companySecurityExceptions":[],"affectedEmployee":0,"bankRelFinancialEntity":{},"bankRelAccountHolder":"","bankRelReferenceType":{"code":""},"bankRelReferenceValue":"","accountingPlan":{"code":"C1"}}
@vanduc1102
vanduc1102 / nodejs-run-batch.bat
Last active June 11, 2016 06:50
config nodejs when you have many instance on your pc, This is Windows , and set PATH
set NODEJ_HOME="C:\Program Files (x86)\nodejs"
set PATH=%PATH%;%NODEJ_HOME%
call npm install
call node.exe
@vanduc1102
vanduc1102 / employee.json
Created June 13, 2016 03:11
400-bad request - broken pipe
{
"person": {
"id": 43569,
"guid": "14E43E6D9151B7A7",
"number": "321412341234",
"validFrom": "2016-01-28T16:02:29.350+07:00",
"civility": {
"code": "M"
},
"title": {
{
"id": 43569,
"guid": "14E43E6D9151B7A7",
"number": "321412341234",
"validFrom": "2016-01-28T16:02:29.350+07:00",
"validTo": null,
"picture": null,
"civility": {
"id": null,
"code": "M",