Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@eliasdabbas
eliasdabbas / score_links.py
Last active September 20, 2022 12:26
Score internal links using two columns of "Source" and "Destination". This calculates various link importance metrics link degree centrality, betweenness centrality and PageRank.
@iosifnicolae2
iosifnicolae2 / Readme.md
Last active March 12, 2024 19:42
Youtube is Boring

How To Make Youtube Less Boring

Tutorial: https://www.youtube.com/watch?v=hIqMrPTeGTc
Paste the below code in your browser console (F12 > Console):

(()=>{
    markAllVideosAsNotBeingInteresting({
        iterations: 1
    });
})();
@VorticonCmdr
VorticonCmdr / tagManagerCustomFunctions.js
Last active January 10, 2022 16:30
tagManager functions for SEO
// returns textFragment
function() {
if (!performance) {
return 'n/a';
}
var p = performance.getEntriesByType('navigation');
if (p.length < 1) {
return 'navigation missing';
}
@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@abraithwaite
abraithwaite / chill-zoom.sh
Last active March 18, 2024 17:03
Zoom in Systemd Cgroups on Linux. Change the max allocations to fit your workstation.
#!/usr/bin/bash -xe
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-4
MemoryHigh=6G
EOF
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop"
@rain-1
rain-1 / Raspberry Pi, Static HTTPS site with Docker and Nginx.md
Last active April 3, 2024 18:17
Raspberry Pi, Static HTTPS site with Docker and Nginx

Raspberry Pi, Static HTTPS site with Docker and Nginx

This tutorial is dated Oct 2021, if it's much further on than that this information might be out of date.

This is a guide on setting up a static HTTPS website on your raspberry pi using docker and nginx. The aim is to have this running on the raspberry pi and to be able to access it from a host computer on the same local network. You should already be able to ssh into your pi from your host computer and have raspberry pi OS set up.

Find your raspberry pi

@ak--47
ak--47 / productSchool.js
Last active April 18, 2024 12:11
💾 data loader for the Product Analytics Certification
//PUT YOUR MIXPANEL TOKEN AND SECRET BELOW:
const credentials = {
"token": "your-mixpanel-token-here",
"secret": "your-mixpanel-secret-here"
}
/*
@monnoval
monnoval / openwrt-raspberry-pi4-nginx-php7-sqlite-wordpress.md
Last active May 13, 2021 03:16
Running OpenWrt + NGINX + PHP7 + SQLite + Wordpress in Raspberry Pi4

Run OpenWrt + Nginx + PHP7 + SQLite + Wordpress in Raspberry Pi4

* 13 May 2021
Broke my initial build due to a sys upgrade then re did all of below. Not sure what caused the problem. The main blockage I experienced is the expanding of the second partion, see here for the update.
* 18 April 2021
More or less complete by now, any updates or workarounds I will just keep on adding here
* 13-16 April 2021
Content for this post is still in progress as I'm compiling all the workarounds, fixes and commands for all this to work


@ppcdias
ppcdias / magento2-disable-unused-modules.sh
Last active March 26, 2024 08:13
Magento 2.4 Disable Unused Modules to Increase Performance
# magento 2 disable unused modules
bin/magento module:disable Vertex_AddressValidation
bin/magento module:disable Vertex_AddressValidationApi
bin/magento module:disable Vertex_Tax
bin/magento module:disable Temando_ShippingRemover
bin/magento module:disable Dotdigitalgroup_Chat
bin/magento module:disable Dotdigitalgroup_Email
@ppcdias
ppcdias / magento2.sh
Last active February 3, 2023 07:39
Magento 2 Useful CLI/SSH Commands List
# setup update and deploy if developer mode is enabled
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
# set production mode and deploy
php bin/magento deploy:mode:set production
php bin/magento cache:clean
php bin/magento setup:upgrade
php bin/magento setup:di:compile