Skip to content

Instantly share code, notes, and snippets.

@e7d
e7d / remove-old-kernels.sh
Last active August 29, 2015 14:23
Remove all unused kernels on Debian-based systems
#!/bin/sh
sudo apt-get remove $(dpkg -l|egrep '^ii linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)
update-grub
#!/bin/sh
SRC=/usr/src
NGINX_VERSION=1.8.0 # http://nginx.org/en/download.html
NPS_VERSION=1.9.32.6 # https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@e7d
e7d / bootstrap-autocomplete.html
Last active March 5, 2021 20:44
Bootstrap autocomplete field
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="sampleAutocomplete" class="col-sm-3 control-label">Sample Autocomplete</label>
<div class="col-sm-9">
<input type="text" class="autocomplete form-control" id="sampleAutocomplete" data-toggle="dropdown" />
<ul class="dropdown-menu" role="menu">
<li><a>Action</a></li>
<li><a>Another action</a></li>
<li><a>Something else here</a></li>
<li><a>Separated link</a></li>
@e7d
e7d / parseDSV.js
Created August 12, 2014 10:05
[JavaScript] Parse delimiter-separated values (CSV, TSV...)
// Comma-separated values to JSON
function parseCSV(data) {
return parseDSV(data, ",");
}
// Tabulation-separated values to JSON
function parseTSV(data) {
return parseDSV(data, "\t");
}
@e7d
e7d / README.md
Last active December 19, 2022 09:13
[Debian] Build a Squid anonymous proxy from source code

If you don't want to build Squid from scratch, you can simply Setup a Squid anonymous proxy

Build a Squid anonymous proxy from source code

Please note that this whole manual refers to the version 3.5.23 of Squid. You probably would have to adapt some commands to the version you will actually download.

Table of contents