Skip to content

Instantly share code, notes, and snippets.

@yrtchs
yrtchs / gist:4b82a6aefcf595a6ddb41d7c442dc8d9
Created April 12, 2025 18:43
Add Let's Encrypt certificate via certbot
1. sudo apt install certbot python3-certbot-nginx
2. sudo certbot --nginx -d domain.com -d www.domain.com
3. sudo crontab -e
4. 0 0 * * * /usr/bin/certbot renew --quiet
5. sudo systemctl restart nginx
@yrtchs
yrtchs / bootstrap-wide.css
Created June 22, 2020 15:43 — forked from tiborp/bootstrap-wide.css
Extra media queries for BIG screens
// Extra big for Twitter Bootstrap
@media screen and (min-width: 1400px) {
.container {
width: 1370px;
}
}
@media screen and (min-width: 1600px) {
.container {
width: 1570px;
@yrtchs
yrtchs / gist:be837d26749e2f1858192adb36feeaa8
Created April 16, 2020 08:36
current active menu from url
//Current sidebar-menu item
let url = window.location;
let element = $('.dt-side-nav .dt-side-nav__link').filter(function () {
return this.href == url;
}).addClass('active').parent().addClass('selected');
while (true) {
if (element.is('a')) {
element = element.parent().addClass('selected').parent().addClass('active');
}
<script>
window.onload = function(){
if(window.innerWidth >= 1024)
document.getElementById('video-container').innerHTML = '<video autoplay id="bgvid" poster="img/water-on-glass.jpg"><source src="videos/medoff-video.webm" type="video/webm"><source src="videos/medoff-video.mp4" type="video/mp4"></video>'
};
</script>