Skip to content

Instantly share code, notes, and snippets.

View shamilovstas's full-sized avatar

Stanislav Shamilov shamilovstas

  • SoftServe
  • Kharkiv, Ukraine
View GitHub Profile
@shamilovstas
shamilovstas / mitmproxy cheat sheet
Last active June 18, 2019 12:30 — forked from 2bard/mitmproxy cheat sheet
mitmproxy cheat sheet
Movement:
j, k down, up
h, l left, right (in some contexts)
space page down
pg up/down page up/down
arrows up, down, left, right
import os
import re
import sys
symbolMap = {
'а': 'a',
'б': 'b',
'в': 'v',
'г': 'g',
'д': 'd',
import random
TRUE_ANSWER = 1
GAMES_COUNT = 1000000
DOORS_COUNT = 5
def gen(ans):
answer = [0, 0, 0, 0, 0, 0]
answer[ans] = 1
return answer
@shamilovstas
shamilovstas / emulator-proxy
Last active February 7, 2018 15:36
AVD proxy runner
#!/bin/bash
is_int() {
re='^[0-9]+$'
if ! [[ $1 =~ $re ]]
then
echo 1
else
echo 0
fi
#!/bin/bash
send_request() {
lowerLimit=$1
upperLimit=$2
while [ "$lowerLimit" -le "$upperLimit" ];
do
curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer tKhsfeRDTqvr02aRNO3PjA88jE28PscZvT2RIxoj8JixtDSJCFlvVU3pzh5pWlVQ' -H 'Accept: application/json' -d "$(generate_request $lowerLimit)" 'http://videoapp.itcraftlab.com/api/v1/request' ;
lowerLimit=$(($lowerLimit + 1))
done
@shamilovstas
shamilovstas / .gitignore
Created October 2, 2017 10:12
gitignore
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
@shamilovstas
shamilovstas / themes-debug.xml
Created September 2, 2017 23:50 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
http://dshinin.ru/Upload_Books2/Books/2008-07-15/200807152203201.PDF
import os
import re
import sys
def main(argv = sys.argv):
if len(argv) <= 1:
print("Too few arguments")
sys.exit(2)
public interface OnTimerTickListener {
void onTick();
}