Skip to content

Instantly share code, notes, and snippets.

View dvapelnik's full-sized avatar

Dmitry Vapelnik dvapelnik

  • Ukraine, Vinnitsa
View GitHub Profile
@alexwybraniec
alexwybraniec / gist:2972487
Created June 22, 2012 12:32
Enabling Memcached graphing in Munin, Ubuntu 10.04 LTS, with munin-node already installed
sudo apt-get update
sudo apt-get install munin-plugins-extra
cd /etc/munin/plugins
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_bytes
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_counters
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_rates
sudo aptitude install libcache-memcached-perl
sudo /etc/init.d/munin-node restart
sudo tail -f /var/log/munin/munin-node.log
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@crofty
crofty / index.html
Last active October 22, 2021 08:24
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
</head>
<body>
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@timoxley
timoxley / isPortTaken.js
Last active April 19, 2024 11:51
check if a port is being used with nodejs
var isPortTaken = function(port, fn) {
var net = require('net')
var tester = net.createServer()
.once('error', function (err) {
if (err.code != 'EADDRINUSE') return fn(err)
fn(null, true)
})
.once('listening', function() {
tester.once('close', function() { fn(null, false) })
.close()
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this-&gt;anything()