wget -c https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
This file contains hidden or 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 dev.is_bored? || job.sucks? | |
Job::search(:flexible_hours true, :company_culture 100) | |
end |
This file contains hidden or 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 | |
$photoid = <photoid>; | |
$alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'; | |
// function to encode from photoid to shortcode | |
function base_encode($photoid, $alphabet) | |
{ | |
$base_count = strlen($alphabet); | |
$encoded = ''; |
This file contains hidden or 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
server { | |
listen 80; | |
root /var/www/html; | |
index index.php; | |
server_name example.com; | |
location / { | |
try_files $uri $uri/ =404; | |
} |
This file contains hidden or 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
def surviving_covid19 | |
alive = true | |
while alive do | |
wear_mask | |
aware_distance(1) # in meter | |
wash_hands | |
if covid_symptom || close_contact('positive') |
This file contains hidden or 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
def sop_kerajaan_gagal | |
abang_jamil = true | |
lockdown = 0 | |
while abang_jamil do | |
lockdown += 1 | |
initiate_lockdown(lockdown) | |
end |
This file contains hidden or 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
$models = \Model::withTrashed()->get(); | |
foreach ($models as $model) { | |
if (\Str::contains($model->name, ' ')) { | |
echo $model->id.','; | |
} | |
} |
Update Mysql Config
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Change from 127.0.0.1 to 0.0.0.0
. . .
lc-messages-dir = /usr/share/mysql
skip-external-locking
If you want your Gitea instance to send notification emails, you can either install Postfix or use some transactional mail service such as SendGrid, MailChimp, MailGun, or SES.
To enable email notifications, open the configuration file and edit the following lines:
sudo nano /etc/gitea/app.ini
[mailer]
OlderNewer