Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTmFxa3pyUy3GsY22RTVF+I22VkXw2r9ToeLElHmtHJto5IEvLNQfK6ZrOitn8SxRpPvXgrgX5L9+4dDX7KiHoLGD+db9OxBVDFX+5ytAtSeuunWjIzkLFE6XyTrATCXTGMHpwOfT6PXQKXUc56Ydjx4mDh+SNBr2VZagZYR3GC78psRy0mRFhkZLo29gZBmTR0QpkXRpymPcYTPVkG9s/bDfQRkT59LykV84/2jNJXhVKQIVjFIGHDxO4VUwG6B9n1c9mej0Ex/Z9L8BrCV8VkAnPmtt3m0QmFx/uIeESLRZp2JvFLl7Qj58oPG+Xn6t1Oy9mlK5blR5teyTHDfQt
@syndicut
syndicut / .kitchen.yml
Last active August 22, 2016 07:01
Testing salt formulas with Test Kitchen and Testinfra
---
driver:
name: vagrant
platforms:
- name: ubuntu-12.04
- name: ubuntu-14.04
provisioner:
name: salt_solo
@syndicut
syndicut / mfschunkserver_status.sh
Created March 27, 2015 10:05
lizardfs monitoring scripts
#!/bin/sh
#
processName="mfschunkserver";
processCount=`pgrep -x -c ${processName}`;
if [ ${processCount} -eq 2 ]; then
echo "PASSIVE-CHECK:${processName};0;Ok";
exit 0;
else
echo "PASSIVE-CHECK:${processName};2;${processName} is NOT RUNNING";
#!/bin/bash -eu
runpatch()
{
FILE="$1"
POS=$(grep -obUaP "\xf8\xff\x4d\x85\xe4\x48\x8d\x50\x21\x0f\x84\x83\x03\x00\x00" "$FILE" | cut -d: -f1)
if test -z "$POS"; then
echo "Haystack is missing, aborting..." >&2
return
fi
printf "\xf8\xff\x4d\x85\xe4\x48\x8d\x50\x29\x0f\x84\x83\x03\x00\x00" | dd of="$FILE" bs=1 seek="$POS" conv=notrunc
#!/usr/bin/env bash
LIBSSL=`dpkg -l libssl* | grep ii | awk '{ print $2 }'`
LIST=$( for i in `dpkg -L $LIBSSL|grep /lib/` ; do if [ -f $i ] ; then echo $i ; fi ; done )
LIST=`for i in $LIST ; do lsof -n $i|tail -n+2 ; done|awk '{print $2}'|sort|uniq`
LIST=$(for i in $LIST ; do echo "`readlink /proc/$i/exe`"; done | sort | uniq)
RESTART=$(for i in $LIST; do
BINARY=$i
@syndicut
syndicut / Makefile
Last active December 29, 2015 07:59
Problem with parallel writes to moosefs from multiple nodes
CC = g++
PROGRAM = main
#CFLAGS = -g `pkg-config --cflags gtk+-x11-2.0` `pkg-config --cflags gtkextra-2.0`
#LDFLAGS = `pkg-config --libs gtk+-x11-2.0` `pkg-config --libs gtkextra-2.0`
CFLAGS = -g #`pkg-config --cflags gtk+-2.0`
LDFLAGS = -lpthread -lrt#`pkg-config --libs gtk+-2.0`
SOURCE = main.cc
OBJS = main.o
.cpp.o:
, opcode: GETATTR (3), nodeid: 1, insize: 56
, success, outsize: 120
, opcode: LOOKUP (1), nodeid: 1, insize: 48
, success, outsize: 144
, opcode: OPEN (14), nodeid: 62289, insize: 48
, success, outsize: 32
, opcode: READ (15), nodeid: 62289, insize: 80
, success, outsize: 135
, opcode: RELEASE (18), nodeid: 62289, insize: 64
, success, outsize: 16
diff --git a/src/80211.c b/src/80211.c
index c2aff59..202556b 100644
--- a/src/80211.c
+++ b/src/80211.c
@@ -39,8 +39,18 @@ const u_char *next_packet(struct pcap_pkthdr *header)
const u_char *packet = NULL;
/* Loop until we get a valid packet, or until we run out of packets */
+#ifdef __APPLE__
+ struct pcap_pkthdr *pkt_header = NULL;
Description: Adds a firstseg option to livehttp streaming module
It is needed to allow segment start from different number then 1,
it can be usefull if vlc is restarted and clients expect segments numbers
to be more then the last they've received
.
vlc (2.0.3-0ubuntu0.12.04.1yandex1) precise; urgency=low
.
* Added firstseg option for livehttp streaming module
Author: Rashit Azizbaev <syndicut@yandex-team.ru>
@syndicut
syndicut / gist:3729149
Created September 15, 2012 18:21
Regexp to replace hook do end ruby block
^( *)<%= hook :([^ ,]+).*do %>(((?!^\1<% end %>).|\n)+)^\1<% end %>
\1<div data-hook="\2">\3\1</div>