Skip to content

Instantly share code, notes, and snippets.

View djvdorp's full-sized avatar

Daniel van Dorp djvdorp

View GitHub Profile
@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 
@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
@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 {

#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
[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
@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/

@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'
@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' );
@coolswitcher
coolswitcher / [email protected]
Created August 26, 2017 21:32
Multiple memcached instances systemd script
[Unit]
Description=memcached daemon for %i
After=network.target
[Service]
ExecStart=/usr/share/memcached/scripts/systemd-memcached-wrapper /etc/memcached_%i.conf
[Install]
WantedBy=multi-user.target
@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2