socket.emit('hello', msg);
io.to('my room').emit('hello', msg);
socket.broadcast.to('my room').emit('hello', msg);
import React from 'react'; | |
import {ScrollView, Text} from 'react-native'; | |
const isCloseToBottom = ({layoutMeasurement, contentOffset, contentSize}) => { | |
const paddingToBottom = 20; | |
return layoutMeasurement.height + contentOffset.y >= | |
contentSize.height - paddingToBottom; | |
}; | |
const MyCoolScrollViewComponent = ({enableSomeButton}) => ( |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
/* Safari and Chrome */ | |
.flex-direction-nav-featured a{ | |
margin-top: 4%; | |
} | |
/* Safari only override */ | |
::i-block-chrome,.flex-direction-nav-featured a{ | |
margin-top: 5%; | |
} |
socket.emit('hello', msg);
io.to('my room').emit('hello', msg);
socket.broadcast.to('my room').emit('hello', msg);
# 10 biggest files | |
sudo du -a /var | sort -n -r | head -n 10 | |
# check available space | |
df -h | |
# check biggest folders/directories in GB | |
du -hsx * | sort -rh | head -10 | |
# create user and assign password |
import axios, { AxiosResponse } from 'axios'; | |
import { get } from 'lodash-es'; | |
const rest = axios.create({ | |
baseURL: 'some base URL goes here', | |
}); | |
// this one send file as Blob type | |
const getPdf = () => ( | |
rest.get(`/get-pdf`, { |
https://cloud.digitalocean.com/account/api/tokens
sudo apt-get install s3cmd
https://docs.digitalocean.com/products/spaces/resources/s3cmd/
span { | |
display:inline-block; | |
width:180px; | |
white-space: nowrap; | |
overflow:hidden !important; | |
text-overflow: ellipsis; | |
} | |
/* From http://stackoverflow.com/questions/11426275/how-can-i-show-dots-in-a-span-with-hidden-overflow*/ |
sudo gitlab-runner verify --delete
command, dead runners will be deleted# Resize Swap to 8GB | |
# Turn swap off | |
# This moves stuff in swap to the main memory and might take several minutes | |
sudo swapoff -a | |
# if it won't work issue: | |
# sudo /sbin/swapoff | |
# Create an empty swapfile | |
# Note that "1G" is basically just the unit and count is an integer. | |
# Together, they define the size. In this case 8GB. |
yarn add -D husky lint-staged is-ci
npm set-script prepare "husky install"
npm run prepare
npx husky add .husky/pre-commit "npm run pre-commit"
"prepare": "is-ci || husky install"
package.json
scripts section: