- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/5798930 (
git reset
vsgit rm --cached
)
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
# .github/workflows/build-blog.yml | |
# | |
name: Build & Publish blog | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build-blog: |
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
<?php | |
namespace App\Command; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\DomCrawler\Crawler; | |
use Symfony\Component\Mailer\MailerInterface; |
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
#!/bin/bash | |
find . -name "*.pdf" -print0 | while read -d $'\0' file | |
do | |
/usr/bin/pdfcpu validate -q "$file" &> /dev/null | |
if [ $? == "1" ]; then | |
((if++)) | |
echo "$if) $file PDF file is invalid." | |
else |
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
# PICO | |
yum -y install nano | |
ln -s /usr/bin/nano /usr/bin/pico | |
export EDITOR="pico" | |
# NTP | |
dnf install chrony | |
systemctl start chronyd | |
systemctl status chronyd | |
systemctl enable chronyd |
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
CREATE DATABASE db_name; | |
CREATE USER 'db_name'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; | |
GRANT ALL ON db_name.* TO 'db_user'@'localhost'; | |
FLUSH PRIVILEGES; |
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
# HOW TO APPLY THIS RULE: JAIL.LOCAL | |
# | |
# make sure to use a smaller name, so you don't exceed the limit | |
# | |
# [apache-hackers] | |
# enabled = true | |
# port = http,https | |
# filter = apache-hackers | |
# banaction = iptables-allports | |
# logpath = /var/log/apache*/*access*.log |
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
iptables -F | |
iptables -A INPUT -p tcp --dport 22 -s 192.168.0.1 -j ACCEPT -m comment --comment "office.i2ct.com" | |
iptables -A INPUT -p tcp --dport 22 -j DROP | |
iptables -L -n |
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
<?php | |
$a = [ | |
'b' => [ | |
'c' => [ | |
'd' => 'test', | |
], | |
], | |
]; | |
var_dump($a['b']['c']['d']); |
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
#!/bin/bash | |
for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done |
NewerOlder