Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

docker

docker ps # current containers
docker run # create and start the container
docker create # create container
dokcer exec # to run commnads in container for once
docker volume # create a docker volume
docker network # create a docker network
docker rm # remove container 
docker images # list the images
docker rmi # remove image
docker build # build a new image from dockerfile
docker push # push your image to docker repo
docker pull # download an image from docker repo
docker commit # create an image from container
Comment

docker

cheat sheet

https://github.com/lifeeric/docker-cheat-sheet
Comment

docker

$ docker ps -a
Comment

docker

docker run -d -t -u $(id -u ${USER}):$(id -g ${USER}) node
Comment

docker

$ docker-compose -f docker-compose.yml -f docker-compose.admin.yml run backup_db
Comment

docker

docker run -d -n riscv -p 6080:80 -e USER=riscv -e PASSWORD=riscv -e RESOLUTION=1920x1080 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
Comment

docker

#command of existing containers

docker ps -a
Comment

docker

FROM risingstack/alpine:3.3-v4.2.6-1.1.3

COPY package.json package.json
RUN npm install

# Add your source files
COPY . .
CMD ["npm","start"]
Comment

docker

$ sudo dockerd
Comment

docker

docker run -d --name myapp -p 8080:8080 myappimage
Comment

Docker

const options = {
    // Number of posts to scrape: {int default: 20}
    number: 50,

    // Scrape posts published since this date: { int default: 0}
    since: 0,

    // Set session: {string[] default: ['']}
    // Authenticated session cookie value is required to scrape user/trending/music/hashtag feed
    // You can put here any number of sessions, each request will select random session from the list
    sessionList: ['sid_tt=21312213'],

    // Set proxy {string[] | string default: ''}
    // http proxy: 127.0.0.1:8080
    // socks proxy: socks5://127.0.0.1:8080
    // You can pass proxies as an array and scraper will randomly select a proxy from the array to execute the requests
    proxy: '',

    // Set to {true} to search by user id: {boolean default: false}
    by_user_id: false,

    // How many post should be downloaded asynchronously. Only if {download:true}: {int default: 5}
    asyncDownload: 5,

    // How many post should be scraped asynchronously: {int default: 3}
    // Current option will be applied only with current types: music and hashtag
    // With other types it is always 1 because every request response to the TikTok API is providing the "maxCursor" value
    // that is required to send the next request
    asyncScraping: 3,

    // File path where all files will be saved: {string default: 'CURRENT_DIR'}
    filepath: `CURRENT_DIR`,

    // Custom file name for the output files: {string default: ''}
    fileName: `CURRENT_DIR`,

    // Output with information can be saved to a CSV or JSON files: {string default: 'na'}
    // 'csv' to save in csv
    // 'json' to save in json
    // 'all' to save in json and csv
    // 'na' to skip this step
    filetype: `na`,

    // Set custom headers: user-agent, cookie and etc
    // NOTE: When you parse video feed or single video metadata then in return you will receive {headers} object
    // that was used to extract the information and in order to access and download video through received {videoUrl} value you need to use same headers
    headers: {
        'user-agent': "BLAH",
        referer: 'https://www.tiktok.com/',
        cookie: `tt_webid_v2=68dssds`,
    },

    // Download video without the watermark: {boolean default: false}
    // Set to true to download without the watermark
    // This option will affect the execution speed
    noWaterMark: false,

    // Create link to HD video: {boolean default: false}
    // This option will only work if {noWaterMark} is set to {true}
    hdVideo: false,

    // verifyFp is used to verify the request and avoid captcha
    // When you are using proxy then there are high chances that the request will be
    // blocked with captcha
    // You can set your own verifyFp value or default(hardcoded) will be used
    verifyFp: '',

    // Switch main host to Tiktok test enpoint.
    // When your requests are blocked by captcha you can try to use Tiktok test endpoints.
    useTestEndpoints: false
};
Comment

docker

docker run 
-d  # Detached mode, swap for -it if we want interactive.
-p 8080:8080  
-v ${absolute_path_your_project_dir}/${MY_WAR}.war:/usr/local/tomcat/webapps/app.war 
tomcat:latest
Comment

Docker

.user(id, options) //Scrape posts from a specific user (Promise)
.hashtag(id, options) //Scrape posts from hashtag section (Promise)
.trend('', options) // Scrape posts from a trends section (Promise)
.music(id, options) // Scrape posts by music id (Promise)

.userEvent(id, options) //Scrape posts from a specific user (Event)
.hashtagEvent(id, options) //Scrape posts from hashtag section (Event)
.trendEvent('', options) // Scrape posts from a trends section (Event)
.musicEvent(id, options) // Scrape posts by music id (Event)

.getUserProfileInfo('USERNAME', options) // Get user profile information
.getHashtagInfo('HASHTAG', options) // Get hashtag information
.signUrl('URL', options) // Get signature for the request
.getVideoMeta('WEB_VIDEO_URL', options) // Get video meta info, including video url without the watermark
.getMusicInfo('https://www.tiktok.com/music/original-sound-6801885499343571718', options) // Get music metadata
Comment

Docker

const headers = {
    "user-agent": "BOB",
    "referer": "https://www.tiktok.com/",
    "cookie": "tt_webid_v2=BOB"
}
getVideoMeta('WEB_VIDEO_URL', {headers})
user('WEB_VIDEO_URL', {headers})
hashtag('WEB_VIDEO_URL', {headers})
trend('WEB_VIDEO_URL', {headers})
music('WEB_VIDEO_URL', {headers})
// And after you can access video through {videoUrl} value by using same custom headers
Comment

docker

docker commands
Comment

docker

docker-compose -f docker-compose.yml up -dv
Comment

docker

version: "3.3"
services:
  db:
    image: mysql
    platform: linux/amd64
    restart: always
    container_name: mysql-db-users
    environment:
      MYSQL_ROOT_PASSWORD: 'password'
      MYSQL_DATABASE: 'userDb'
    ports:
      - "3306:3306"
  phpmyadmin:
    image: phpmyadmin
    restart: always
    container_name: php-my-admin-users
    ports:
      - "8081:80"
Comment

PREVIOUS NEXT
Code Example
Shell :: create a bootable usb drive ubuntu 
Shell :: generate ssh key linux 
Shell :: how to move a file in bash 
Shell :: powershell and command 
Shell :: ubuntu terminal search command 
Shell :: git warning lf will be replaced by crlf 
Shell :: bash compare two strings 
Shell :: add user with sudoer centos 
Shell :: how to install path adb 
Shell :: git cherry-pick 
Shell :: add gist file to dev.to 
Shell :: Stderr: VBoxManage.exe: error: UUID 
Shell :: bash change keymap 
Shell :: batch disable windows system recovery 
Shell :: dev/ktm not found 
Shell :: How can i get batch files to run through the new window terminal 
Shell :: mac end process shortcut 
Shell :: libSSH Exploit 
Shell :: Install Chef Habitat from the Command Line 
Shell :: close app with terminal 
Shell :: calenderfx installation 
Shell :: Change user/group for directory and all contents 
Shell :: Enum install 
Shell :: installing flow globally 
Shell :: dev/kdm device permission error android studio 
Shell :: how to install wine in ubuntu 
Shell :: how to open pg_hba.conf file in ubuntu using visual studio 
Shell :: not fond apache 2 di ubuntu 
Shell :: run exe in proton prefix 
Shell :: windows loader modified uninstall other cracks 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =