Skip to content

Instantly share code, notes, and snippets.

View saintbyte's full-sized avatar
🌏
заапгрейдить и пропатчить

Yegor Kazantsev saintbyte

🌏
заапгрейдить и пропатчить
View GitHub Profile
@madeye
madeye / ProxySettings.java
Created April 4, 2012 01:53
Set proxy for Android Webview
package me.madeye;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.http.HttpHost;
import android.content.Context;
@guillaumepiot
guillaumepiot / PYTHON - Convert URL in text to anchor tags (links)
Created January 15, 2013 16:42
PYTHON - Convert URL in text to anchor tags (links)
iOS Maps Frameworks
Google Maps SDK for iOS
https://developers.google.com/maps/documentation/ios/
New to the market. Good choice if you wanted to do Android development (Google Maps SDK for Android).
Requires API key. API keys are not readily available. Submitted application for API key. Response can be found at:
@tomasperezv
tomasperezv / gist:5175824
Last active June 12, 2018 21:15
Communication between multiple tabs, using local storage changes
// User has 2 tabs open: Page 1 and Page 2, both in the same domain
// , subdomain and protocotol
// Page1: https://subdomain.domain.com
...
var data = {
a: 5,
// Local storage won't be triggered unless the value is different,
// so we add a random identifier.
id: Math.floor((Math.random()*1000)+1)
# coding=utf-8
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import datetime
import sys
import time
import threading
import traceback
import SocketServer
@scaryguy
scaryguy / change_primary_key.md
Last active April 8, 2024 14:23
How to change PRIMARY KEY of an existing PostgreSQL table?
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@archon810
archon810 / BuildConfig.java
Last active September 28, 2022 15:17
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
@Wack0
Wack0 / upwned247.php
Last active December 13, 2023 08:16
UCam247/Phylink/Titathink/YCam/Anbash/Trivision/Netvision/others IoT webcams : remote code exec: reverse shell PoC. (works only in qemu usermode)
<?php
/*
Updated version, 2016-12-02: fixed shellcode so it *actually* works on QEMU
usermode emulation (seems I pushed an old version), and removed debug output.
-------------------------
NB: THIS PoC ONLY WORKS IN QEMU USERMODE EMULATION!
If anyone wants to fix this, go ahead (no pun intended).
However, I don't have a vulnerable product and am unwilling to acquire one.
@BlaayLock
BlaayLock / Convert Unicode to ASCII without errors, utf8 -> cp1251
Last active May 29, 2020 17:50
Python: Convert Unicode to ASCII without errors, utf8 -> cp1251
#! python2
# //coding: utf-8
# coding=utf-8
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
a = u'1a'
a = a.decode('utf-8').encode('cp1251')
print a