Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / Better Usage.md
Created December 20, 2010 12:07
Strip package scripts from .deb packages (postinst, postrm, preinst, prerm)

The best way to use this tool is to hook apt's use of dpkg to run it before doing any package installs.

In your apt.conf, put this:

DPkg::Pre-Install-Pkgs {"xargs -rL1 bash /path/to/stripdeb.sh 2>&1 | logger -t stripdeb"}

Then, a demo:

% sudo apt-get install mysql-server-5.1

@gorakhargosh
gorakhargosh / pdnsd.conf
Created August 2, 2011 02:57
pdnsd.conf
// Sample pdnsd configuration file. Must be customized to obtain a working pdnsd setup!
// Read the pdnsd.conf(5) manpage for an explanation of the options.
// Add or remove '#' in front of options you want to disable or enable, respectively.
// Remove '/*' and '*/' to enable complete sections.
global {
perm_cache=999999;
cache_dir="/usr/local/var/cache/pdnsd";
# pid_file = /var/run/pdnsd.pid;
run_as="nobody";
@bonsaiviking
bonsaiviking / gist:3077294
Created July 9, 2012 15:53
Nmap's dns-zone-transfer meets zonetransfer.me
$ nmap --script dns-zone-transfer --script-args dns-zone-transfer.domain=zonetransfer.me -p 53 -Pn $(dig +short zonetransfer.me NS | head -1)
Starting Nmap 6.02 ( http://nmap.org ) at 2012-07-09 10:50 CDT
Nmap scan report for ns12.zoneedit.com. (209.62.64.46)
Host is up (0.033s latency).
rDNS record for 209.62.64.46: ns12.zoneedit.com
PORT STATE SERVICE
53/tcp open domain
| dns-zone-transfer:
| zonetransfer.me. SOA ns16.zoneedit.com. soacontact.zoneedit.com.
@pklaus
pklaus / bird6.conf
Created December 17, 2012 01:38
A configuration file for the bird routing daemon being set up to work with OSPFv3 (the IPv6 variant).
log syslog all;
router id 0.0.0.159;
# Turn on global debugging of all protocols
debug protocols all;
# Define a route filter...
# filter test_filter {
# if net ~ 10.0.0.0/16 then accept;
@m-ou-se
m-ou-se / test.cpp
Created April 9, 2013 12:55
Ugly hacky code-duplication finder.
#include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
struct line {
std::string file;
size_t line_number;
@aguslr
aguslr / README.md
Last active December 20, 2015 00:19
Grub2 loopback multiboot pen drive to boot from ISO
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>getUserMedia Example</title>
<meta name="description" content="WebRTC Simple example" />
<meta name="author" content="Ido Green | greenido.wordpress.com">
<meta name="keywords" content="WebRTC, HTML5, JavaScript, Hack, Ido Green" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1">
@tr3buchet
tr3buchet / debootstrap.md
Last active July 5, 2023 11:26
debian usb debootstrap

make sure any needed utilities are installed

sudo aptitude install debootstrap coreutils util-linux e2fsprogs

get usb device

df -h
@MarcDiethelm
MarcDiethelm / Contributing.md
Last active April 1, 2024 13:55
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@tzbob
tzbob / uhosts.scala
Created November 7, 2013 23:20
automatically update pdnsd.adblock
#!/usr/bin/env scala
import scala.io.Source
import java.io.FileWriter
import java.util.Calendar
import scala.util.matching.Regex
val resources = List(
Resource("http://someonewhocares.org/hosts/hosts"),
Resource(