Skip to content

Instantly share code, notes, and snippets.

View aknik's full-sized avatar
🐰
Hola

Aknik aknik

🐰
Hola
View GitHub Profile
@aknik
aknik / gist:8c7a38ecade1d0ebbc8dd7f931c8f46e
Created June 10, 2020 08:59
To blacklist the module of your wireless card:
To blacklist the module of your wireless card:
sudo vi /etc/modprobe.d/blacklist.conf (or create a custom one)
Uncomment the module name that has a # in the beginning of the line:
blacklist eth1394
@aknik
aknik / gold-silver-rates.php
Created August 17, 2018 19:42 — forked from surferxo3/gold_silver_rates.php
Gold and Silver Rates API to fetch updated rates with their respective currency and price.
<?php
/*#############################
* Developer: Mohammad Sharaf Ali
* Designation: Web Developer
* Version: 1.0
*/#############################
const RATES_API_URL = 'http://goldprice.org/NewCharts/gold/images/goldsilverpricesforcalculators.txt';
>>> 64*1/float(125*1000)
0.000512
>>> 64000*1/float(125*1000)
0.512
>>> 64000000*1/float(125*1000)
512.0
>>> 64000000*1/float(134.2*1000)
476.90014903129656
>>> 32000000*1/float(134.2*1000)
238.45007451564828
@aknik
aknik / servidor.py
Created June 26, 2018 18:15 — forked from jgrocha/servidor.py
Moon phases based on pyephem
#-*- coding: utf-8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse
import ephem, datetime
import json
# Phases of the Moon, using the datetime.now() at UTC
# http://127.0.0.1:8899/
# Phases of the Moon, using the datetime.datetime(int(year), int(month), int(day))) at UTC
@aknik
aknik / servidor.py
Created June 26, 2018 18:15 — forked from jgrocha/servidor.py
Moon phases based on pyephem
#-*- coding: utf-8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse
import ephem, datetime
import json
# Phases of the Moon, using the datetime.now() at UTC
# http://127.0.0.1:8899/
# Phases of the Moon, using the datetime.datetime(int(year), int(month), int(day))) at UTC
@aknik
aknik / MyAPP.java
Created June 14, 2018 11:57
plusdede
.method public isPremium()Z
.locals 1
.line 82
iget-boolean v0, p0, Lcom/YisusStudios/Plusdede/MyAPP;->networkEnabled:Z
if-eqz v0, :cond_0
iget-boolean v0, p0, Lcom/YisusStudios/Plusdede/MyAPP;->networkPremium:Z
@aknik
aknik / termux.txt
Last active June 22, 2018 12:29
termux pyephem ephem scipy numpy
# https://wiki.termux.com/wiki/Package_Management#its-pointless_.28live_the_dream.29
pkg install python-dev clang libcrypt-dev wget git gnupg -y
pkg install openssh -y
pip install pip --upgrade
$PREFIX/bin/wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh
pkg install numpy scipy -y
export LDFLAGS+=" -lm"
pip install pyephem
If you need to know the value of a string - e.g. a parameter -
you can use Log.d(String tag, String message) to log it to the system log.
const-string/jumbo v0, "YourTag"
invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
If you are having trouble navigating the smali code and understand the flow of an app
you can use the following smali code. It will call Thread.dumpStack() which logs the current thread's call stack.
@aknik
aknik / self-signed-certificate-with-custom-ca.md
Created June 7, 2018 18:36 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@aknik
aknik / system.img.txt
Created June 6, 2018 16:43
system.img android rom linux
Procedure:
1. UnZip Android or your present data.img file to your Home Folder. Or a folder of your liking (or even on your memory card!), just remember to cd before you do the following:
2. Open Terminal and Copy&Paste (Ctrl+C, Ctrl+Shift+V) this:
Code:
dd if=/dev/zero bs=1M count=XXX >> data.img
where XXX is the amount, in MB, by which data.img should be increased by.
My filesize started out as 256MB and I wanted a total of 512MB. That would mean I needed a extra 256MB, so I executed this:
Code:
dd if=/dev/zero bs=1M count=256 >> data.img