Skip to content

Instantly share code, notes, and snippets.

View MichaelMayorov's full-sized avatar

Michael Mayorov MichaelMayorov

View GitHub Profile
@MichaelMayorov
MichaelMayorov / post_flags.py
Created November 20, 2012 09:06
Script for automatic posting flags on competitions like RuCTF(e)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright::MichaelMayorov([email protected])
"""
Simple python(tested on 2.7.3) script for automatic posting flags on competitions like RuCTF(e)
It stores flags in sqlite3 database which located in same directory with script.
@MichaelMayorov
MichaelMayorov / jury_emulator.py
Created November 20, 2012 18:14
Simple TCP server which should emuale iteraction with jury server on challenges like RuCTF(I use it for testing flag posting script)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright::MichaelMayorov([email protected])
"""
I found example TCP server somewhere in Internet and quickly adapted it to
emulate jury flag receiving service on competitions like RuCTF(e)
I didn't test it too long.
@MichaelMayorov
MichaelMayorov / ampserver_example.py
Last active December 16, 2015 18:19
Template for future Buildbot AMP slave-server
from twisted.protocols import amp
class GetInfo(amp.Command):
arguments = []
response = [
('commands', amp.AmpList([
('name', amp.String()),
('version', amp.Integer()),
])
@MichaelMayorov
MichaelMayorov / update_player_stat.py
Last active December 17, 2015 09:48
Script takes player's statistic from server and put it to sqlite3 db
#!/usr/bin/env python2
import urllib
import json
import sqlite3
import sys
if len(sys.argv) == 2:
DB_NAME = sys.argv[1]
#!/bin/bash
PROD_SLAVE=${HOME}/projects/buildbot/virtualenv/lib/python2.7/site-packages/buildbot_slave-0.8.9_pre_273_g9cd7f9a-py2.7.egg/buildslave/
PROD_MASTER=${HOME}/projects/buildbot/virtualenv/lib/python2.7/site-packages/buildbot-0.8.9_pre_286_g1e7a514-py2.7.egg/buildbot/
SRC_SLAVE=${HOME}/projects/buildbot/slave/buildslave/
SRC_MASTER=${HOME}/projects/buildbot/master/buildbot/
# Copy slave files from git directory to production
cp ${HOME}/amp/protocols.py ${PROD_SLAVE}
cp ${HOME}/amp/protocols.py ${SRC_SLAVE}
cp ${SRC_SLAVE}/amp_bot.py ${PROD_SLAVE}
@MichaelMayorov
MichaelMayorov / DSfix.ini
Created January 23, 2014 17:29
DSfix config
renderWidth 1280
renderHeight 720
presentWidth 0
presentHeight 0
aaQuality 0
aaType SMAA
ssaoStrength 0
ssaoScale 1
ssaoType VSSAO
dofOverrideResolution 540
@MichaelMayorov
MichaelMayorov / Untitled.ipynb
Created May 2, 2016 05:32
Compare distribution between 2 hash fuction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides: redmine-fcgi
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5