Skip to content

Instantly share code, notes, and snippets.

3> c(t).
{ok,t}
4> {ok, Pid} = t:start_link().
{ok,<0.47.0>}
5> exit(Pid, kill).
** exception exit: killed
6> exit(Pid, kill).
true
7> f().
ok
-module(t).
-behaviour(gen_server).
-export([start_link/0]).
-export([
init/1,
handle_call/3,
handle_cast/2,
@Zert
Zert / erlang-skel.el
Created October 21, 2011 09:21
Erlang/OTP tempo templates
;;
;; %CopyrightBegin%
;;
;; Copyright Ericsson AB 2010. All Rights Reserved.
;;
;; The contents of this file are subject to the Erlang Public License,
;; Version 1.1, (the "License"); you may not use this file except in
;; compliance with the License. You should have received a copy of the
;; Erlang Public License along with this software. If not, it can be
;; retrieved online at http://www.erlang.org/.
@Zert
Zert / gist:1400123
Created November 28, 2011 11:49
Haskell test
module Main where
import Text.HTML.SanitizeXSS
import System.IO
import Data.Text (pack, unpack)
import Data.Binary.Get
import Data.Binary.Put
import Data.Binary
import Data.Word
Код на gist
%% -*- mode: Erlang; -*-
[
%% SASL config
{sasl,
[
%%{sasl_error_logger, {file, "log/sasl-error.log"}},
{sasl_error_logger, tty},
{errlog_type, all},
{error_logger_mf_dir, "log/sasl"}, % Log directory
root@ubuntu ~ # grep -r '/etc/profile' /etc
/etc/skel/.profile:# the default umask is set in /etc/profile; for setting the umask
/etc/skel/.bashrc:# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
/etc/profile:# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
/etc/profile:if [ -d /etc/profile.d ]; then
/etc/profile: for i in /etc/profile.d/*.sh; do
Binary file /etc/alternatives/rzsh matches
Binary file /etc/alternatives/ksh matches
Binary file /etc/alternatives/usr.bin.ksh matches
Binary file /etc/alternatives/zsh matches
@Zert
Zert / gist:4562937
Last active December 11, 2015 06:58
$./eclus -node -node-name 'epmd@localhost' -node-cookie 1
2013/01/18 14:28:23 Start with name 'epmd@localhost' and cookie '1'
2013/01/18 14:28:23 Publish ENode at 5858
2013/01/18 14:28:23 Accept new
2013/01/18 14:28:23 Read 20, 18: [120 22 226 77 0 0 5 0 5 0 4 101 112 109 100 0 0 0]
2013/01/18 14:28:23 IN: [120 22 226 77 0 0 5 0 5 0 4 101 112 109 100 0 0 0]
2013/01/18 14:28:23 NodeInfo: &{FullName: Name:epmd Domain: Port:5858 Type:77 Protocol:0 HighVsn:5 LowVsn:5 Extra:[0] Creation:0}
2013/01/18 14:28:23 New node epmd
2013/01/18 14:28:23 Got reply: {reply:[121 0 0 1] isClose:false}
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification