Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Snegovikufa's full-sized avatar
📍
Push the red button

Rustam Safin Snegovikufa

📍
Push the red button
View GitHub Profile
reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Language\English_UK
@Snegovikufa
Snegovikufa / a.js
Created July 11, 2021 11:40
Hide original translation on skyeng vocubulary page
Array.prototype.forEach.call(document.getElementsByClassName("original"), function(el) {
// Do stuff here
el.hidden = true;
});
@Snegovikufa
Snegovikufa / check ports.bat
Created August 25, 2020 16:51
checks tcp ports you cannot bind to
netsh interface ipv4 show excludedportrange protocol=tcp
@Snegovikufa
Snegovikufa / game.py
Created March 26, 2020 15:09
Simple game
import arcade
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 650
SCREEN_TITLE = "Platformer"
class MyGame(arcade.Window):
def __init__(self):
super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
import arcade
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 650
SCREEN_TITLE = "Platformer"
PLAYER_START_X = 64
PLAYER_START_Y = 94
@Snegovikufa
Snegovikufa / 7-zip-default-extract.reg
Created November 11, 2019 10:08 — forked from zabbarob/7-zip-default-extract.reg
Make 7-Zip extract to folder when double-clicking archives. (based on http://superuser.com/a/447791)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\7-Zip.001\shell]
@="extract"
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract]
@="Extract to Folder"
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract\command]
@="\"C:\\Program Files\\7-Zip\\7zG.exe\" x \"%1\" -o*"
[HKEY_CLASSES_ROOT\7-Zip.7z\shell]
@Snegovikufa
Snegovikufa / convert.sh
Created May 20, 2019 04:15
Convert file line endings from lf to crlf
find . -type f -name '*.cs' -exec unix2dos {} \;
@Snegovikufa
Snegovikufa / app.py
Created February 8, 2018 08:16
Extracts dlls from libmonodroid_bundle_app.so
from elftools.elf.elffile import ELFFile
from zipfile import ZipFile
import gzip, string
from io import StringIO, BytesIO
data = open('libmonodroid_bundle_app.so', "rb")
elffile = ELFFile(data)
section = elffile.get_section_by_name('.dynsym')
data.seek(0)
data_read = data.read()
@Snegovikufa
Snegovikufa / word.vb
Created October 23, 2017 11:46
Удаляет из документа Word все стили, кроме стилей по умолчанию
Sub DelUserStyles()
Dim objStyle As Style
For Each objStyle In ActiveDocument.Styles
If Not objStyle.BuiltIn Then
objStyle.Delete
End If
Next
End Sub
@Snegovikufa
Snegovikufa / a.sh
Last active September 25, 2017 12:21
Git changed lines per author
#!/bin/sh
git shortlog -sn | awk ' {print $2, $3, $4} ' > names.txt
cat names.txt | while read cn
do
name="$(echo $cn | sed -e 's/\r//g')"
echo $name
git log --no-merges -p -w --shortstat --author="$name" --since="1 Jan, 2017" -p -- . ':(exclude)*.xml' ':(exclude)*.png' ':(exclude)*.g.cs' ':(exclude)*.Designer.cs' ':(exclude)lib/*' ':(exclude)*.csproj' | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print " files changed: ", files, "lines inserted: ", inserted, "lines deleted: ", deleted }'
done