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/env python | |
import json | |
import sys | |
har = open(sys.argv[1]) | |
parsed = json.load(har) | |
parsed['request']['url'] = '/'+'/'.join(parsed['request']['url'].split('/')[3:]) | |
response = '%(method)s %(url)s %(httpVersion)s\r\n' % parsed['request'] |
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/env python | |
import contextlib, os, finalize_vm, subprocess | |
backup_path = '/mnt/backup/tmp/backup' | |
@contextlib.contextmanager | |
def flock(path): | |
while True: | |
try: |
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
Variant.where({:is_master => false}).each { |v| Variant.where({:sku => v.sku}).where(['id != ?', v.id]).where({:is_master => false}).delete_all } |
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
^( *)<%= hook :([^ ,]+).*do %>(((?!^\1<% end %>).|\n)+)^\1<% end %> | |
\1<div data-hook="\2">\3\1</div> |
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
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 <[email protected]> |
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
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; |
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
, 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 |
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
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: |
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/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 |
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 -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 |
OlderNewer