Skip to content

Instantly share code, notes, and snippets.

(require 'term)
(defun visit-ansi-term ()
"If the current buffer is:
1) a running ansi-term named *ansi-term*, rename it.
2) a stopped ansi-term, kill it and create a new one.
3) a non ansi-term, go to an already running ansi-term
or start a new one while killing a defunt one"
(interactive)
(let ((is-term (string= "term-mode" major-mode))
(is-running (term-check-proc (buffer-name)))
require "msgpack"
require "socket"
class Bar
end
class Server
attr_accessor :server, :exit_now
def initialize
@server = TCPServer.new("0.0.0.0", 8123)
#include "heapdatamodel.h"
namespace RBKit {
HeapDataModel::HeapDataModel(HeapItem * _item, QObject *parent)
: QAbstractItemModel(parent), rootItem(_item)
{
}
HeapDataModel::~HeapDataModel() {
// delete items;
#include "sortobjectproxymodel.h"
SortObjectProxyModel::SortObjectProxyModel(QObject *parent) :
QSortFilterProxyModel(parent)
{
}
bool SortObjectProxyModel::hasChildren(const QModelIndex &parent) const
{
const QModelIndex sourceIndex = mapToSource(parent);
(source gnu)
(source marmalade)
(source melpa)
(depends-on "[cl-struct-package-desc git-gutter-fringe (20131117 2335) Fringe version of git-gutter.el [github] ((git-gutter (0 42)) (fringe-helper (0 1 1))) single melpa nil]")
(depends-on "[cl-struct-package-desc icicles (20140115 354) Minibuffer input completion and cycling. nil tar melpa nil nil nil]")
(depends-on "[cl-struct-package-desc smart-mode-line (20131126 1625) A color coded smart mode-line. ((emacs (24 3)) (dash (2 2 0))) single melpa nil]")
(depends-on "[cl-struct-package-desc zenburn-theme (20131119 1158) A low contrast color theme for Emacs. nil single melpa nil]")
(depends-on "ac-js2")
(depends-on "ace-jump-mode")
{
"version": "3.0.0",
"gauges": {
"jvm.gc.heap.max": {
"value": 123
}
},
"counters": {
"big_messages,dim1=val1,dim2=val2": {
"count": 100
package main
import "fmt"
type Foo struct {
whitelist []string
}
func main() {
foo := new(Foo)
ystemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization docker.
Detected architecture x86-64.
Welcome to Fedora 24 (Twenty Four)!
Set hostname to <a6456c8481a4>.
Cannot determine cgroup we are running in: No medium found
Failed to allocate manager object: No medium found
[!!!!!!] Failed to allocate manager object, freezing.
For a lot of distros the /etc/resolv.conf is autogenerated by NetworkManager or dhcp-client, in those cases usually
/etc/resolv.conf contains a warning like:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
From Ubuntu Server Guide
=========================
Traditionally, the file /etc/resolv.conf was a static configuration file that rarely needed to be
@gnufied
gnufied / iptables_rules.sh
Created December 5, 2016 02:23 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP