Skip to content

Instantly share code, notes, and snippets.

@viyatb
viyatb / README.md
Created October 22, 2015 06:09
Genymotion scripts

Helper scripts for genymotion and android development

@viyatb
viyatb / Google Domains.txt
Created December 12, 2015 14:41
List of known Google domain names. Useful e.g. for filtering Mint referrers.
# What's this? It's a monster list of Google domain names that have been found to refer
# users to sites that are monitored with Shaun Inman's "Mint" statistics package. http:/haveamint.com/
#
# A huge number of these came from Shawn Blanc's domain list here:
# http://shawnblanc.net/2010/08/cleanup-mint-unique-referrers/
#
# I merged them in to my existing list for this "MONSTAH LIST". Enjoy!
#
# To filter many, many of the Google search results from your "Newest Unique Referrers" results in
# Mint, copy the list below verbatim (don't include these "comment" lines) and paste them into your
@viyatb
viyatb / db.py
Created January 28, 2016 06:50 — forked from carljm/db.py
SQLAlchemy and Postgres autocommit
"""
SQLAlchemy, PostgreSQL (psycopg2), and autocommit
See blog post: http://oddbird.net/2014/06/14/sqlalchemy-postgres-autocommit/
"""
from contextlib import contextmanager
from sqlalchemy import create_engine, event
from sqlalchemy.orm import sessionmaker, Session as BaseSession
@viyatb
viyatb / nginx.conf
Last active January 30, 2016 06:15
Barebones nginx config to run OWTF with HTTPS
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
_____ _ _ _ _____ _____
| | | | |_ _| __|
| | | | | | | | | __|
|_____|_____| |_| |__|
@owtfp
http://owtf.org
[*] OWTF Version: 1.0.1, Release: LionHeart (Beta)
[-] Loading framework please wait..
@viyatb
viyatb / ss.go
Created May 4, 2016 06:01 — forked from mitchellh/ss.go
// +build windows
package screen
import (
"fmt"
"image"
"reflect"
"syscall"
"unsafe"
@viyatb
viyatb / lockfile.py
Created June 6, 2016 06:23 — forked from ionrock/lockfile.py
A file locking example
"""
A file lock implementation that tries to avoid platform specific
issues. It is inspired by a whole bunch of different implementations
listed below.
- https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py
- http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup
- http://stackoverflow.com/questions/489861/locking-a-file-in-python
- http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/
- http://packages.python.org/lockfile/lockfile.html
@viyatb
viyatb / gist:27d5bb00dc2a75c15f50481270a0dd4b
Created November 28, 2016 14:28 — forked from crazed/gist:7670423
getting a moto x back to stock on mac os x
  1. grab the moto-fastboot version of fastboot here

  2. grab the appropriate stock firmware here (tip: you want the one that matches your android build number in settings -> about phone)

  3. unzip this file somewhere and make it easy to run the moto-fastboot-osx64 command from step 1

  4. get your phone into fastboot mode, google it if needed but just power the phone off, hold the down volume key and power button for 3 seconds then let go, should get you there

  5. verify you are ready for flashing:

     ./moto-fastboot-osx64 devices
     -- should list a device --
    
  6. most of the time you just need to flash system and recovery images, so from your unzipped stock firmware files do this:

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@viyatb
viyatb / test.c
Created March 15, 2017 23:57
Test
Hi