This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from awsglue.dynamicframe import DynamicFrame | |
from pyspark.sql.functions import to_timestamp, col | |
dataFrame = datasource0.toDF().withColumn("created_at", to_timestamp(col("created_at"),"yyyy-mm-dd HH:mm:ss")) | |
editedData = DynamicFrame.fromDF(dataFrame, glueContext, "editedData") | |
applymapping1 = ApplyMapping.apply(frame = editedData, mappings = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.ssh/config | |
Host gitolite-as-alice | |
HostName git.company.com | |
User git | |
IdentityFile /home/whoever/.ssh/id_rsa.alice | |
IdentitiesOnly yes | |
Host gitolite-as-bob | |
HostName git.company.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /filebeat-*/_search | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"term": { | |
"host.hostname": { | |
"value": "mail" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# netstat -tpln | |
Active Internet connections (only servers) | |
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name | |
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 647/sshd | |
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 22183/postgres | |
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1099/master | |
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 7779/apache2 | |
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7779/apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update | |
apt upgrade | |
reboot | |
apt install zsh | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...$$('.pricepop')].reduce((prev, curr) => prev + parseFloat(curr.innerText.slice(0, -2)), 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you are adding multiple lines of text with \n to a div, add the following to the css for the div in question: | |
div { | |
white-space: pre-wrap; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendMessage() { | |
const MSG = encodeURI('test message') | |
const TOKEN = 'xxx' | |
const CHAT = '-xxx' | |
fetch(`https://api.telegram.org/bot${TOKEN}/sendMessage?chat_id=${CHAT}&parse_mode=html&text=${MSG}`, { | |
method: 'POST', | |
headers: new Headers({'Content-Type': 'application/json'}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Права на файлы и директории в WordPress | |
600 (-rw-------) wp-config.php | |
644 (-rw-r--r--) Файлы | |
755 (-rwxr-xr-x) Директории | |
Или альтернативный вариант | |
660 (-rw-rw----) wp-config.php | |
664 (-rw-rw-r--) Файлы |
NewerOlder