start new:
tmux
start new with session name:
tmux new -s myname
| # Step 1: Import the random module | |
| import random | |
| # Step 2: Define a class for cards | |
| class Card: | |
| def __init__(self, rank, suit): | |
| self.rank = rank # an integer from 3 to 15 (3 is lowest and 15 is highest) | |
| self.suit = suit.lower() # a string from "spades", "clubs", "diamonds", or "hearts" | |
| def __str__(self): |
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
| FROM alpine | |
| RUN apk add --update --no-cache nodejs | |
| RUN npm i -g yarn | |
| ADD package.json yarn.lock /tmp/ | |
| ADD .yarn-cache.tgz / | |
| RUN cd /tmp && yarn | |
| RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules |
| version: '2.2' | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1 | |
| container_name: elasticsearch | |
| environment: | |
| - cluster.name=docker-cluster | |
| - bootstrap.memory_lock=true | |
| - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
| ulimits: |
| #The snippet generator for RcovPublisher in Jenkins is incomplete. | |
| #When you add in metric values for desired coverage percentages, the generator doesnt provide the syntax. | |
| #Here it is served up on a silver platter. | |
| step([$class: 'RcovPublisher', reportDir: 'coverage/rcov', targets: [[$class: 'hudson.plugins.rubyMetrics.rcov.model.MetricTarget', metric: 'TOTAL_COVERAGE', healthy: 87, unhealthy: 86, unstable:85], [$class: 'hudson.plugins.rubyMetrics.rcov.model.MetricTarget', metric: 'CODE_COVERAGE', healthy: 87, unhealthy: 86, unstable: 85]]]) |
| Link full khóa training device driver của embedded Linux ở đây nhé các bạn. Đây là video mình record trong khóa trước, do bị mắc 1 số lỗi về quay phát nên mình sẽ record lại trong khóa hiện tại mình đang dạy. | |
| Bài 1: Kernel module - simple character device. | |
| https://bit.ly/2AzsxrB | |
| Bài 2: Giới thiệu về cơ chế timer trong hệ điều hành. | |
| https://bit.ly/2O2rDpy | |
| Bài 3: Hướng dẫn lập trình điều khiển interrupt trong Linux | |
| kernel. https://bit.ly/2vtenmk | |
| Bài 4: Giới thiệu về cơ chế system call trên Linux. | |
| https://bit.ly/2KkXm32 | |
| Bài 5: Giới thiệu về kỹ thuật IPC - Inter Process Communication. |
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |