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
import ( | |
"archive/zip" | |
"io" | |
"os" | |
"path/filepath" | |
"strings" | |
) | |
func zipit(source, target string) error { | |
zipfile, err := os.Create(target) |
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
import argparse | |
from mock import Mock | |
m = Mock() | |
parser = argparse.ArgumentParser() | |
subparsers = parser.add_subparsers() | |
query_group = subparsers.add_parser('query') | |
add_group = subparsers.add_parser('add') |
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
type MediumCollection implements Node @derivedTypes @dontInfer { | |
name: String | |
slug: String | |
tags: [String] | |
creatorId: String | |
description: String | |
shortDescription: String | |
image: MediumCollectionImage | |
metadata: MediumCollectionMetadata | |
virtuals: MediumCollectionVirtuals |
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
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"net/url" | |
"golang.org/x/net/html" | |
"io" | |
) |
Приветствую, любители реверс-инжинирить Android. Перед вами шпаргалка по Smali - аналогу ассемблера для Android-приложений.
Изначальный текст на русском взят отсюда. Там текст появился из машинного перевода официальной документации.
В итоге, оформил сухой текст + поправил небольшие опечатки и корявости перевода. По поводу замечаний и предложений можете писать либо мне в ЛС, либо оформлять PR на Gist.
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
""" | |
A Python dict implementation. | |
""" | |
import collections | |
MINSIZE = 8 | |
PERTURB_SHIFT = 5 | |
dummy = "<dummy key>" |
First of all, get prepared by installing the Android SDK and SDK tools in order to get the adb
executable. Then:
-
adb connect <device ip>
-
To get the service name `adb shell "cat /proc/net/unix | grep devtools_remote", which will give you something like this output:
00000000: 00000002 00000000 00010000 0001 01 423897 @webview_devtools_remote_18279
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 | |
"""Convert an SVG file to a PNG file.""" | |
from argparse import ArgumentParser | |
import subprocess | |
import os.path | |
def main(): |
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
// ==UserScript== | |
// @name Spotify Ad Muter | |
// @version 1.2 | |
// @namespace http://tampermonkey.net/ | |
// @description Detects and blocks ads on Spotify. Automatically mute Spotify ads. Turn sound on again after the ad. | |
// @match https://*.spotify.com/* | |
// @grant none | |
// @run-at document-start | |
// @downloadURL https://gist.github.com/marcbelmont/1ea63270867a4e8786dd5f172d8d4489/raw | |
// @updateURL https://gist.github.com/marcbelmont/1ea63270867a4e8786dd5f172d8d4489/raw |
OlderNewer