Skip to content

Instantly share code, notes, and snippets.

View djvdorp's full-sized avatar

Daniel van Dorp djvdorp

View GitHub Profile
@amboutwe
amboutwe / yoast_seo_title_remove.php
Last active February 17, 2022 14:57
Yoast SEO title snippets
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO Title From All Pages
* Credit: Yoast Team
* Last Tested: Jun 17 2020 using Yoast SEO 14.3 on WordPress 5.4.2
*/
add_filter( 'wpseo_title', '__return_false' );
@mamashin
mamashin / gist:afb0e31999b1615428dede37883ef186
Created March 23, 2017 08:15
tcpdump show only HTTP headers
tcpdump -i eth0 -A -s 10240 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\n\1/g'
@mrkara
mrkara / Powerline.md
Last active December 8, 2022 20:18
Install Powerline on Debian 9 Stretch
  1. Install pip sudo apt-get install python-pip
  2. Install powerline sudo pip install powerline-status
  3. Install fonts sudo apt-get install fonts-powerline
  4. Add these lines to respective files:

.vimrc > set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/

[clever@amd-nixos:~/apps/nixpkgs]$ git remote -v
channels [email protected]:NixOS/nixpkgs-channels.git (fetch)
channels [email protected]:NixOS/nixpkgs-channels.git (push)
origin [email protected]:NixOS/nixpkgs.git (fetch)
origin [email protected]:NixOS/nixpkgs.git (push)
[clever@amd-nixos:~/apps/nixpkgs]$ git fetch channels
8512747..adfcc2d nixos-unstable -> channels/nixos-unstable
[clever@amd-nixos:~/apps/nixpkgs]$ git checkout channels/nixos-unstable
M nixos/lib/make-squashfs.nix
M pkgs/top-level/platforms.nix

#BOSH

  • Inbound to tcp/25555 From internal
  • Inbound to tcp/25250 From bosh-agent (blobstore)
  • Inbound to tcp/25777 from bosh-agent (registry)
  • Inbound to tcp/6868 From jumpbox, concourse (allow jumpboxes + concourse to bosh create-env + talk to the agent on directors
  • Inbound to tcp/4222 From bosh-agent

#BOSH-Agent

  • Inbound to tcp/6868 From BOSH
  • Inbound to tcp/22 From internal
@vachanda
vachanda / icinga2.conf
Created September 19, 2016 10:15
Nginx config for icinga2 web interface.
server {
listen *:80;
server_name www.icinga2.com;
root /usr/share/icingaweb2/public; #Path of icinga2 web directory
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location = /favicon.ico {
@miguelmota
miguelmota / i3-cheat-sheet.md
Last active December 17, 2024 16:19 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (window/command or alt by default depending on config)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@lornajane
lornajane / mac.md
Last active April 28, 2025 18:17
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@DanyHenriquez
DanyHenriquez / disable_tracker.sh
Created June 7, 2016 10:20
Disable tracker Ubuntu 16.04
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset --hard