Posts

How to generate a Dockerfile from an image?

chenzj/dfimage - as described on hub.docker.com regenerates Dockerfile from other images. So you can use it as follows: docker pull chenzj/dfimage  alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm chenzj/dfimage" dfimage IMAGE_ID > Dockerfil

Restore a MongoDB Logical Backup

$ mongorestore --drop --host localhost --port 27017 --user secret --password secret --oplogReplay --gzip --dir /opt/mongodb/backup/testbackup/20160809_1306/test1/dump 2016-08-09T14:23:04.057+0200 building a list of dbs and collections to restore from /opt/mongodb/backup/testbackup/20160809_1306/test1/dump dir 2016-08-09T14:23:04.065+0200 reading metadata for wikipedia.pages from /opt/mongodb/backup/testbackup/20160809_1306/test1/dump/wikipedia/pages.metadata.json.gz 2016-08-09T14:23:04.067+0200 restoring wikipedia.pages from /opt/mongodb/backup/testbackup/20160809_1306/test1/dump/wikipedia/pages.bson.gz 2016-08-09T14:23:07.058+0200 [#######.................] wikipedia.pages 63.9 MB/199.0 MB (32.1%) 2016-08-09T14:23:10.058+0200 [###############.........] wikipedia.pages 127.7 MB/199.0 MB (64.1%) 2016-08-09T14:23:13.060+0200 [###################.....] wikipedia.pages 160.4 MB/199.0 MB (80.6%) 2016-08-09T14:23:16.059+0200 [#######################.] wikipedia...

How do I find my API URL in Salesforce?

The API URL of Salesforce may be different. For example, after the login in the CRM you can use the domain URL:   https://eu6.salesforce.com/ . However, it should look like   https://eu6.salesforce.com/services/data/v31.0/   that means you use the   domain URL   and add   services/data/v31.0/ to it.

Log In Using the SOAP API

The Bulk API doesn't provide a login operation, so you must use SOAP API to log in. Create a text file called  login.txt  containing the following text: 01 <? xml   version = "1.0"   encoding = "utf-8"   ?> 02 < env:Envelope   xmlns:xsd = " http://www.w3.org/2001/XMLSchema " 03      xmlns:xsi = " http://www.w3.org/2001/XMLSchema-instance " 04      xmlns:env = " http://schemas.xmlsoap.org/soap/envelope/ " > 05    < env:Body > 06      < n1:login   xmlns:n1 = "urn: partner.soap.sforce.com " > 07        < n1:username >your_username</ n1:username > 08        < n1:password >your_password</ n1:password > 09      </ n1:login > 10    </ env:Body > 11 </ env:Envelope > Replace  your_username  and  your_password  with your Salesforce user name and password. Using a command-line window, execute the following cURL command: 1 curl  https://login.salesforce.com/services/So...

Configuring Git Large File Storage

Once  Git LFS is installed , you need to associate it with a large file in your repository. If there are existing files in your repository that you'd like to use GitHub with, you need to first remove them from the repository and then add them to Git LFS locally. For more information, see " Moving a file in your repository to Git LFS ." If there are referenced Git LFS files that did not upload successfully, you will recieve an error message. For more information, see " Resolving Git Large File Storage upload failures ." Open  the terminal . Change your current working directory to an existing repository you'd like to use with Git LFS. To associate a file type in your repository with Git LFS, enter  git lfs track  followed by the name of the file extension you want to automatically upload to Git LFS. For example, to associate a  .psd  file, enter the following command: $ git lfs track "*.psd" > Adding path *.psd Every file type you want to associ...

How to convert .tar.gz etc to .deb format using checkinstall?

Install checkinstall sudo apt install checkinstall Extract the tarball into a directory. In this case, it is  /tmp/program_example . Open  terminal  and cd into it with: sudo -i cd /tmp/program_example ./configure Now, run: make and then checkinstall -D --pakdir=/home/youruser/packages/

yum---no module named yum

Downoad RPM [root@dsnode01 py]# ll total 7520 -rw-r--r-- 1 root root   92252 Mar 29 12:28 python-2.7.5-48.el7.x86_64.rpm -rw-r--r-- 1 root root  402296 Mar 29 12:28 python-devel-2.7.5-48.el7.x86_64.rpm -rw-r--r-- 1 root root 5911152 Mar 29 12:29 python-libs-2.7.5-48.el7.x86_64.rpm -rw-r--r-- 1 root root 1283988 Mar 29 12:30 yum-3.4.3-150.el7.centos.noarch.rpm [root@dsnode01 py]# rpm -Uvh --replacepkgs *.rpm --force Preparing...                          ################################# [100%] Updating / installing...    1:python-libs-2.7.5-48.el7         ################################# [ 14%]    2:python-2.7.5-48.el7              ################################# [ 29%]    3:python-devel-2.7.5-48.el7        ################################# [ 43%]    4:yum-3.4.3-150.el7.centos         ################################# [ 57%] Cleaning up / removing...    5:yum-3.4.3-158.el7.centos         ################################# [ 71%]    6:python-2.7.5-69.el7_5            ##################...