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
cd ~/Downloads/SuperSU-2.82-SR5 | |
adb connect [IP_ADDRESS]:5555 | |
adb root | |
adb remount | |
adb push common/install-recovery.sh /system/etc/install-recovery.sh | |
adb shell chmod 0755 /system/etc/install-recovery.sh | |
adb shell chcon u:object_r:toolbox_exec:s0 /system/etc/install-recovery.sh | |
adb shell ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh |
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 json | |
import requests | |
# | |
class ApiResponse(object): | |
statusCode = 0 | |
body = {} | |
# | |
def __init__(self, statusCode, body): | |
self.statusCode = statusCode |
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
bind9-data: | |
image: emsi/bind9-data | |
bind9: | |
image: emsi/bind9 | |
volumes_from: | |
- emsi/bind9-data | |
ports: | |
- "53:53" | |
- "53:53/udp" |
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/python | |
## Configuration ## | |
__target_file__ = "example.txt" # Relative path to the target file to process. | |
__find__ = "found" # Block of text to find. | |
__replace__ = "replaced" # Block of text to replace with. | |
################### | |
with open(__target_file__) as file_in: # Open source file for reading. | |
file_out = open(__target_file__+"_replaced", 'w') # Open destination file for writing. | |
for line in file_in: # Loop through source, line by line. | |
new_line = line.replace(__find__,__replace__) # Perform find & replace on current line. |
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/python | |
import os # For running system commands. | |
import argparse # For command-line argument parsing. | |
## Configuration ## | |
__command__ = "ssh -L [LOCAL PORT]:127.0.0.1:[REMOTE PORT] [USER]@[REMOTE HOST] -f -N" | |
################### | |
## TODO ## | |
# * Build out the argparse system to parameterize the connection details. |
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
$('.tooltip') | |
.mouseenter(function(e) { | |
e.preventDefault(); | |
pos = $(this).offset(); | |
$(this).append('<div class="tooltip">'+$(this).attr('rel')+'</div>'); | |
div = $('div.tooltip',$(this)); | |
div.attr('top',pos['top']+5).attr('left',pos['left']).fadeIn(200); | |
}) | |
.mouseleave(function(e) { | |
e.preventDefault(); |
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
<?php | |
/* // EXAMPLE CODE!!! | |
error_reporting("E_ALL"); | |
ini_set('display_errors', '1'); | |
//session_start();$_SESSION = '';var_dump($_SESSION);die; // RESET SESSION | |
// Facebook App credentials | |
$app_id = "xxxxxxxxxxxxxxx"; | |
$app_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
$my_url = "http://xxx.xxx.xxx/xxx.xxx"; |
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
<?php | |
class urlstring { | |
private $params = array(); | |
function __construct() { | |
// Pulling parameters from the URL string. | |
$str = explode("&",$_SERVER['QUERY_STRING']); | |
foreach ($str as $item) { | |
$split = explode("=",$item); | |
$this->params[$split[0]] = $split[1]; |
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
<?php | |
//error_reporting("E_ALL"); | |
//ini_set('display_errors', '1'); | |
// ~~~ EXAMPLE CODE ~~~ // | |
/* | |
// Set your keys here | |
$consumer_key = "xxxxxxxxxxxxxxxxxxxxx"; | |
$consumer_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
$token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; |
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
<?php | |
class pagination { | |
private $forward = true; | |
private $backward = true; | |
private $current_page; | |
private $last_page; | |
function __construct($current_page=false, $last_page=false, $generate=false) { | |
if ($current_page) { | |
$this->current_page = $current_page; |
NewerOlder