Skip to content

Instantly share code, notes, and snippets.

View fedmich's full-sized avatar
🏠
Working from home. open for job opportunity

Federico fedmich

🏠
Working from home. open for job opportunity
View GitHub Profile
@fedmich
fedmich / typo.txt
Last active January 20, 2024 18:25
Typo auto-correct words
github guthub
pouch picjh
tailwind tialwnd
chromium chromusu
slimjet simjet slijmjet simljet slimket sllimjet simlet slimje
whatsapp whatapp wapp
clipboard clipbord
@fedmich
fedmich / etc-hosts.md
Created October 20, 2023 19:04
Troubleshooting etc hosts

1. Did you check that it works correctly?

Changes to hosts should take effect immediately, but Windows caches name resolution data so for some time the old records may be used. Open a command line (Windows+R, cmd, Enter) and type:

ipconfig /flushdns

testing code blocks

timedatectl
@fedmich
fedmich / _commands.sh
Last active September 11, 2023 22:47
timezone for crontab schedule
timedatectl
<?php
$fol = '/var/www/path';
$files = preg_ls2( $fol, false, '@.*\.txt@i' );
var_dump( $files );
?>
@fedmich
fedmich / py-all-timezones.py
Last active April 28, 2023 00:45
Python timezones
import pytz
for tz in pytz.all_timezones:
print tz

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@fedmich
fedmich / update_iframe.js
Created February 12, 2014 00:23
Update_iframe
$(document).ready(function () {
var oFra = $("#iframe_id");
$("#button3").click(function () {
oFra.attr("scrolling", "yes");
oFra.attr("src", oFra.attr("src"));
});
});
<?php
//in controller files
public function beforeFilter() {
parent::beforeFilter();
//Cronjob mode, no views needed
$this->render(false);
//$this->autoRender = false;
//$this->layout = null;