Skip to content

Instantly share code, notes, and snippets.

antoni

Block or report user

Report or block antoni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@antoni
antoni / release-android-debuggable.md
Created May 22, 2017 — forked from nstarke/release-android-debuggable.md
How to make a Release Android App debuggable
View release-android-debuggable.md

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@antoni
antoni / install_mosh_locally.sh
Last active May 18, 2017 — forked from lazywei/install_mosh_locally.sh
Install mosh server without root permission
View install_mosh_locally.sh
#!/bin/sh
# this script does absolutely ZERO error checking. however, it worked
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers
# and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu
mkdir mosh
cd mosh
@antoni
antoni / hashmap.sh
Created May 16, 2017
Hashmap in Bash
View hashmap.sh
declare -A hashmap
hashmap["key"]="value"
hashmap["key2"]="value2"
echo "${hashmap["key"]}"
for key in ${!hashmap[@]}; do echo $key; done
for value in ${hashmap[@]}; do echo $value; done
@antoni
antoni / JsonServer.py
Created Apr 26, 2017
JSON server, which serves local directory static files according to file's basename.
View JsonServer.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
JSON server, which serves local directory static files according to file's basename.
echo '{"key": "valuy"}' > resp.json
python -m JsonServer
curl http://localhost:8000/resp
"""
@antoni
antoni / install_google_cloud_sdk.sh
Created Apr 13, 2017
A script for installing Google Cloud SDK on Ubuntu.Debian
View install_google_cloud_sdk.sh
#!/usr/bin/bash
# Create an environment variable for the correct distribution
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
# Add the Cloud SDK distribution URI as a package source
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@antoni
antoni / ns-inet.sh
Created Aug 27, 2016 — forked from dpino/ns-inet.sh
Setup a network namespace with Internet access
View ns-inet.sh
#!/usr/bin/env bash
set -x
NS="ns1"
VETH="veth1"
VPEER="vpeer1"
VETH_ADDR="10.200.1.1"
VPEER_ADDR="10.200.1.2"
@antoni
antoni / Makefile
Created Aug 26, 2016
A Super-Simple Makefile for Medium-Sized C/C++ Projects (https://spin.atomicobject.com/2016/08/26/makefile-c-projects/)
View Makefile
TARGET_EXEC ?= a.out
BUILD_DIR ?= ./build
SRC_DIRS ?= ./src
SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c -or -name *.s)
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
View wsman_boot_order.py
def _parse_boot_device_list(boot_device_list):
"""
Returns boot devices order specified by current_assigned_sequence field
(a list with names of the devices)
"""
boot_order = []
for _, devices in boot_device_list.items():
for boot_device in devices:
id_parts = boot_device.id.split("#")
@antoni
antoni / Local MITM SSH proxy
Created Jul 27, 2016
Local MITM SSH proxy
View Local MITM SSH proxy
sudo iptables -t nat -D OUTPUT -p tcp -m owner ! --uid-owner root --dport 443 -j REDIRECT --to-port 8080
View installation and configuration
This document describes about installation and configuration of IPMI simulator.
We need: qemu-kvm, OpenIPMI, OpenIPMI-tools
1) Install the qemu-kvm. We need the qemu, which have the IPMI pacthes.
Use the source https://github.com/cminyard/qemu/tree/stable-2.2-ipmi
./configure, make and make install
2) Download the OpenIPMI libraries, from http://sourceforge.net/projects/openipmi/
Follow the process documented in lanserv/README.vm
./configure --prefix=/opt/openipmi/usr --sysconfdir=/opt/openipmi/etc \
--with-perlinstall=/opt/openipmi/usr/lib/perl \
You can’t perform that action at this time.