Skip to content

Instantly share code, notes, and snippets.

View Nor1m's full-sized avatar

Vitaly Mironov Nor1m

View GitHub Profile
@Nor1m
Nor1m / LOG
Created December 23, 2016 07:48
InspectorDebugSession(3): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(3): Constructed
Android application is debugging.
12-23 06:40:23.448 I/art ( 2754): Late-enabling -Xcheck:jni
12-23 06:40:23.702 W/monodroid( 2754): Using override path: /data/data/App1.App1/files/.__override__
12-23 06:40:23.705 W/monodroid( 2754): Using override path: /storage/emulated/0/Android/data/App1.App1/files/.__override__
12-23 06:40:23.705 W/monodroid( 2754): Trying to load sgen from: /data/data/App1.App1/files/.__override__/libmonosgen-2.0.so
12-23 06:40:23.705 W/monodroid( 2754): Trying to load sgen from: /storage/emulated/0/Android/data/App1.App1/files/.__override__/libmonosgen-2.0.so
12-23 06:40:23.706 W/monodroid( 2754): Trying to load sgen from: /data/app/App1.App1-1/lib/x86/libmonosgen-2.0.so
12-23 06:40:23.706 W/monodroid( 2754): Trying to load sgen from: /data/data/App1.App1/files/.__override__/links/libmonosgen-2.0.so
@Nor1m
Nor1m / Export.php
Created March 31, 2018 11:58
EXPORT / IMPORT CSV IN PHP (Экспорт / Импорт CSV в PHP)
<?php
/**
* класс импорта csv
*/
class ExportCSV{
private $filename; // имя файла
private $limitflag; // флаг использования лимитов
private $limit_start; // лимит стартовая позиция
// функция изменения формата даты и времени формат d.m.y.H.i
function get_date( $date ){
if(! $date) return 'неизвестно';
$DATENOW = date('d.m.y.H.i');
$firtsline = explode('.', $DATENOW);
$DAYNOW = $firtsline[0] * 1;
$MOUNTHNOW = $firtsline[1] * 1;
//PHP
function getProgressAction(){
session_start();
echo isset($_SESSION['percent']) ? $_SESSION['percent'] : '';
exit();
}
@Nor1m
Nor1m / l
Created April 21, 2018 09:01
// если пост на стене группы
if ( strpos( $this -> link , '-') !== false ) {
$this -> owner_id = '-' . explode ( '-', explode('_', $this -> link)[0] )[1];
$this -> item_id = explode( '_', $this -> link )[1];
}
// если пост на стене юзера
else {
$this -> owner_id = explode ( '_', explode('wall', $this -> link)[1] )[0];
$this -> item_id = explode ( '_', explode('wall', $this -> link)[1] )[1];
}
@Nor1m
Nor1m / code.php
Last active April 22, 2018 10:55
<?php
function getDataOnVKAction(){
// копируем массив post
$post_array = $_POST;
// берем настройки
$setting = $post_array['setting'];
// превращаем параметры в обьект
$params_first = json_decode( $post_array['params'] );