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
:default ::= action => dump_and_exit | |
lexeme default = latm => 1 | |
ddl ::= | |
<create table>+ action => ddl | |
<create table> ::= | |
(CREATE TABLE) identifier ('(') <table element list> (')' ';') | |
action => create_table |
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
// | |
// Poor man's prepare for querySelector. | |
// | |
// Example: | |
// var query = prepare ('#modeler table[data-id=?] tr[data-id=?]'); | |
// query[0] = entity; | |
// query[1] = attribute; | |
// var enity_attribute_row = document.querySelector(query); | |
// | |
var prepare; |
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
(defun narrow-to-html-style () | |
"Narrow a HTML buffer to the style part and switch to css-mode." | |
(interactive) | |
(widen) | |
(goto-char (point-min)) | |
(re-search-forward "<style") | |
(forward-line 1) | |
(beginning-of-line) | |
(let ((b (point))) | |
(re-search-forward "</style>") |
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
export bold=$(echo -e "\e[1m") | |
export black=$(echo -e "\e[30m") | |
export red=$(echo -e "\e[31m") | |
export green=$(echo -e "\e[32m") | |
export yellow=$(echo -e "\e[33m") | |
export blue=$(echo -e "\e[34m") | |
export magenta=$(echo -e "\e[35m") | |
export cyan=$(echo -e "\e[36m") | |
export reset=$(echo -e "\e[m") |
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
(defun sunpkg-mkdir () | |
"Define all parent directories of a path in a prototype file | |
for Sun's pkgmk tool creating Solaris packages. When the cursor | |
is in a line containing the following crontab definition | |
e cron var/spool/cron/crontabs/root=src/crontab ? ? ? | |
the function will insert the following directories in front of if | |
d cron var ? ? ? |
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
ip2int() | |
{ | |
local a b c d | |
{ IFS=. read a b c d; } <<< $1 | |
echo $(((((((a << 8) | b) << 8) | c) << 8) | d)) | |
} | |
int2ip() | |
{ | |
local ui32=$1; shift |
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 | |
## | |
## Print a process tree on Solaris | |
## | |
use strict; | |
use warnings; | |
my $l; # process list | |
my $r; # process relations |
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 | |
## | |
## Send message to a remote Syslog server. | |
## | |
## Time-stamp: <2016-01-28 16:45:02 ziemann.sascha> | |
## | |
## The program acts similar to the standard logger command, but sends | |
## message only a remote Syslog server. The generated messages | |
## conform to RFC 3164. | |
## |
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
(defun backward-delete-sentence (&optional arg) | |
"Delete back from point to start of sentence. | |
With arg, repeat, or kill forward to Nth end of sentence if negative arg -N." | |
(interactive "p") | |
(delete-region (point) (progn (backward-sentence arg) (point)))) | |
(global-set-key (kbd "M-<backspace>") 'backward-delete-sentence) |
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 | |
set -eu | |
#set -x | |
# Check if the arguments are IPv4 addresses. | |
is-ip () | |
{ | |
local -a ip # Array for IP address | |
local x # Octet input. No -i, because read converts non |
OlderNewer