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
// cc getpwd.c -l procstat -o getpwd | |
#include <sys/param.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/un.h> | |
#include <sys/user.h> | |
#include <sys/queue.h> | |
#include <sys/socket.h> | |
#include <libprocstat.h> |
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
[global] | |
# adjust this to your network/netmask | |
remote announce = 172.16.100.0/24 | |
security = user | |
encrypt passwords = yes | |
ea support = No | |
kernel share modes = No | |
mangled names = no | |
path = /usr/local/timemachine/%U |
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
root@srv0:/etc/jail.conf.d # cat linux0.conf | |
# vim: set syntax=sh: | |
exec.clean; | |
allow.raw_sockets; | |
mount.devfs; | |
linux0 { | |
$id = "2"; | |
devfs_ruleset = 10; | |
$bridge = "bridge10"; |
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/libexec/flua | |
local ucl = require('ucl') | |
local jail = require('jail') | |
function usage() | |
print(arg[0] .. " [ list | create jail.ucl | remove jail.ucl [jname] ]") | |
end | |
if #arg < 1 then | |
usage() |
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/sh | |
add::fds() | |
{ | |
COMMAND="fds,$1:$COMMAND" | |
} | |
run::fds() | |
{ | |
procstat --libxo=xml -w 5 -f "$1" & |
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/sh | |
# | |
# PROVIDE: khosenk | |
# REQUIRE: networking | |
# KEYWORD: | |
. /etc/rc.subr | |
name="khosenk" | |
rcvar="khosenk_enable" |
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
use_synth :piano | |
use_bpm 94 | |
define :intro do | |
play :C5 | |
sleep 0.5 | |
play :E5 | |
sleep 0.5 | |
play :A5 | |
sleep 0.5 |
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
# cat /etc/jail.conf | |
exec.start = "/bin/sh /etc/rc"; | |
exec.stop = "/bin/sh /etc/rc.shutdown"; | |
exec.clean; | |
allow.raw_sockets; | |
allow.mount.tmpfs; | |
mount.devfs; | |
base { |
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/sh | |
if [ "$2" = "show" ]; then | |
make -C /usr/ports/$1 showconfig ; | |
exit | |
fi | |
make -C /usr/ports/$1 config |
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
MODULE subsum; | |
IMPORT Out, Modules; | |
VAR s : POINTER TO ARRAY OF LONGINT; i : LONGINT; | |
PROCEDURE Check ( a : ARRAY OF LONGINT ) : BOOLEAN; | |
VAR i , sum : LONGINT; | |
BEGIN | |
sum := 0; |
NewerOlder