Skip to content

Instantly share code, notes, and snippets.

View profclems's full-sized avatar
🌍
Digital Nomad

Clement Sam profclems

🌍
Digital Nomad
View GitHub Profile
@profclems
profclems / automate-font-setup.sh
Last active November 4, 2020 05:03
Get emojis working on arch linux with noto-fonts-emoji
#!/bin/sh
set -e
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
echo "Setting up Noto Emoji font..."
# 1 - install noto-fonts-emoji package
pacman -S noto-fonts-emoji --needed
# pacman -S powerline-fonts --needed
echo "Recommended system font: inconsolata regular (ttf-inconsolata or powerline-fonts)"
# 2 - add font config to /etc/fonts/conf.d/01-notosans.conf
echo "<?xml version=1.0?>
@dimkouv
dimkouv / arch-wlan-to-eth.sh
Created August 28, 2017 13:42
Share wifi over ethenet | arch linux
# PC2 <---eth cable--- PC1 <-- ((( wifi )))
# connect as root on PC1
su
# install networkmanager
pacman -S networkmanager
# enable networkmanager and start it
systemctl start NetworkManager
@rohitrawat
rohitrawat / sources.list
Created June 12, 2017 18:17
Ubuntu 16.04 Xenial default /etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 29, 2025 22:04
Hyperlinks in Terminal Emulators
@dario2994
dario2994 / mod_rewrite_guide.md
Last active April 6, 2024 18:18
Enable mod_rewrite in apache
  • Apache configuration file

    • ubuntu -> /etc/apache2/apache2.conf
    • arch -> /etc/httpd/conf/httpd.conf
  • Add mod_rewrite and .htaccess support for your site At the end of the configuration files add these lines:

    #My site mod_rewrite configuration
    <Directory "/ABSOLUTE/PATH/YourSite">
      AllowOverride All
    
@jboner
jboner / latency.txt
Last active May 30, 2025 09:45
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD