Skip to content

Instantly share code, notes, and snippets.

View heyitsnovi's full-sized avatar
🎯
Focusing

Кел-Нови heyitsnovi

🎯
Focusing
View GitHub Profile
@heyitsnovi
heyitsnovi / export.txt
Created June 16, 2020 08:34
Export Sqlite Non Debuggable Android App
1 adb backup -noapk com.developername.appname
2 dd if=backup.ab bs=24 skip=1|openssl zlib -d > backup.tar;
3 tar -xvf backup.tar
https://medium.com/@k1d_bl4ck/how-to-extract-the-database-and-other-things-from-an-enterprise-android-app-2194a52b249b
@heyitsnovi
heyitsnovi / Subtractime.php
Created May 18, 2020 04:55
Example of subtracting 2 times
<?php
$hourly_rate = 2.5;
$startTime = new DateTime("2020-05-14 08:00:00");
$endTime = new DateTime("2020-05-14 17:00:00");
$duration = $startTime->diff($endTime); //$duration is a DateInterval object
$worked_hours = (int)$duration->format("%H");
echo $worked_hours * 2.5;
<?php
$ALGORITHM = 'AES-128-CBC';
$IV = '12dasdq3g5b2434b';
$error = '';
if (isset($_POST) && isset($_POST['action'])) {
$password = isset($_POST['password']) && $_POST['password']!='' ? $_POST['password'] : null;
@heyitsnovi
heyitsnovi / binary_search_recursive.js
Created January 10, 2020 06:41
Recursion is a way where we repeatedly call the same function until a base condition is matched to end the recursion. Proceeding with the steps in method 1 here we use the same idea by just changing the parameters of the function in recursive manner and breaking down the problem.
function binarySearch(arr = [], b_start, b_end, x){
if (b_end < b_start)
return false;
var mid = Math.floor((b_end + b_start)/2);
@heyitsnovi
heyitsnovi / database.php
Created December 18, 2019 01:33
CodeIgniter MSSQL connection settings
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'Driver={SQL Server};Server=DESKTOP-123456;Database=database_name',
@heyitsnovi
heyitsnovi / encrypt-decrypt.php
Created July 15, 2018 08:44
Encrypt Decrypt using PHP (Openssl)
<?php
//replace it with your own key
$key = 'TVpI8MlRPQcUH0mOyrKKrJgnIcVM9kXb8Ke6XZkJXW7WyHYbUDMYdNMWgq9e';
$encrypted_str = encrypt_string('John Doe is Here');
$decrypted_str = decrypt_string($encrypted_str);