This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### BEGIN INIT INFO | |
# Provides: iptables | |
# Required-Start: $local_fs $network | |
# Required-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO | |
#!/bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo1 { | |
String bar = "bar1"; | |
String getBar() { | |
return this.bar; | |
} | |
void setBar(final String bar) { | |
this.bar = bar; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
END { | |
kill 15, -$$ | |
} | |
`renice 10 $$`; | |
my $rs_conf = "/etc/rsync-snapshot.conf"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
rhodecode.dao | |
~~~~~~~~~~~~~ | |
Data access layer | |
:created_on: Oct 4, 2011 | |
:author: nvinot | |
:copyright: (C) 2011 Nicolas VINOT <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
private static class A { | |
protected void foo() { | |
System.out.println("A"); | |
} | |
} | |
private static class B extends A { | |
@Override | |
protected void foo() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Partitionning | |
fdisk /dev/sda (n p 1, a 1, t 1 fd, w) | |
sfdisk -d /dev/sda | sfdisk /dev/sdb | |
# RAID 1 | |
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1 --assume-clean | |
# LVM | |
pvcreate /dev/md0 | |
vgcreate debian /dev/md0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -U colors | |
colors | |
# Allow for functions in the prompt. | |
setopt prompt_subst | |
autoload -U add-zsh-hook | |
add-zsh-hook chpwd chpwd_update_git_vars | |
add-zsh-hook preexec preexec_update_git_vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -U colors | |
colors | |
# Allow for functions in the prompt. | |
setopt prompt_subst | |
autoload -U add-zsh-hook | |
add-zsh-hook chpwd update_scm_vars | |
add-zsh-hook preexec preexec_update_scm_vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dbus, struct, socket, uuid | |
def _ip(ip): | |
t = socket.inet_aton(ip) | |
return dbus.UInt32(struct.unpack("I", t)[0]) | |
def _ips(ips): | |
return dbus.Array([_ip(ip) for ip in ips], signature=dbus.Signature('u')) | |
def _ip6(ip): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
backup() { | |
mv "${1}" "${1}.bak" | |
} | |
restore() { | |
mv "${1}" "${1/%\.bak/}" | |
} |
OlderNewer