Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Sergey Agarkov zorgsoft

🏠
Working from home
Block or report user

Report or block zorgsoft

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
@zorgsoft
zorgsoft / date.php
Last active Mar 26, 2019
MODx Evo DocLister RSS
View date.php
<?php
// Сниппет date
// Форматирование даты
if(!isset($en)){
setlocale(LC_ALL, 'ru_RU.UTF-8', 'ru', 'russian');
} else {
setlocale(LC_ALL, 'en_US.UTF-8', 'en', 'english');
}
$date = isset($date)?(isset($sqldate)?$date:strtotime($date)):time();
return strftime(isset($format)?$format:'%d-%m-%Y', $date);
@zorgsoft
zorgsoft / build_android.bat
Created Nov 14, 2017 — forked from Calinou/build_android.bat
Compile Godot for Android easily (on Windows)
View build_android.bat
:: This script must be run from a Windows machine with
:: Android SDK and NDK installed.
:: NOTE: You need Pywin32 to be installed to use multi-threaded compilation.
:: You may need to set "threads" to 1 for the first build, even if you have it installed.
:: Place this script at the root of your Godot Git clone.
:: CC0 1.0 Universal
set threads=%NUMBER_OF_PROCESSORS%
@zorgsoft
zorgsoft / godot_android.bat
Created Nov 14, 2017 — forked from Calinou/godot_android.bat
Compile Godot for Android (from Windows)
View godot_android.bat
@ECHO OFF
set threads=%NUMBER_OF_PROCESSORS%
call scons platform=android tools=no target=release_debug verbose=no warnings=no progress=no -j%threads%
call scons platform=android tools=no target=release verbose=no warnings=no progress=no -j%threads%
cd platform\android\java\
call gradlew build
@zorgsoft
zorgsoft / build_windows.bat
Last active Feb 9, 2018 — forked from Calinou/build_windows.bat
Compile Godot 2.x for Windows easily (with a script encryption key if necessary)
View build_windows.bat
:: This script must be run from a Windows machine with
:: Visual Studio 2017, Python 2.7 and SCons installed at their
:: default locations. 7-Zip also needs to be installed (to compress editor binaries).
:: UPX: https://upx.github.io/
:: NOTE: You need Pywin32 to be installed to use multi-threaded compilation.
:: You may need to set "threads" to 1 for the first build, even if you have it installed.
:: Place this script at the root of your Godot Git clone.
:: CC0 1.0 Universal
View Godot_STYLE-GUIDE.md

Style and conventions

This file attempts to outline various naming and structure conventions, that are to be used throughout the project.

General

  • Files end with one newline.
  • Use Tab characters for indentation.
    • If in the indented block there is an empty line, indent it also to the same level as the rest of the block to make it clear where the block starts and ends.
  • Whenever possible, try to keep line lengths around a maximum of 80 chars.
@zorgsoft
zorgsoft / protectionAgainstReferralSpamHtaccessGen.html
Last active Aug 29, 2015
Protection against referral spam for htaccess
View protectionAgainstReferralSpamHtaccessGen.html
<form>
<table style="width: 100%;">
<tr>
<td style="width: 200px;">Ссылки спамеров<br><small>(можно много, но 1 ссылка в 1й строке, без http и www)</small></td>
<td><textarea name="urlList" id="urlList" style="width: 100%; height: 150px;"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="button" name="start" id="start" value="Создать" calss="btn btn-primary" onclick="cStart();"></td>
</tr>
@zorgsoft
zorgsoft / wp_import.php
Last active Feb 23, 2016
MODx Evo module for import posts from Wordpress
View wp_import.php
<?php
/*
* WP Import, Ver 2015.01.04
* (C) 2015 by ZoRg Soft
* MODx Notes - WP Import модуь для импорта записей из Wordpress
* http://agarkov.org/modx-x/evo-wpimport
*/
$theme = $modx->config['manager_theme'];
$basePath = $modx->config['base_path'];
@zorgsoft
zorgsoft / user.php
Created Feb 17, 2012
Использование jQuery и Ajax в Codeigniter (Урок
View user.php
<div id="ajax_login">
<form action="">
Login: <input type="text" name="user_login" id="user_login"><br>
Password: <input type="password" name="user_password" id="user_password"><br>
<input type="button" name="send_data" id="send_data" value="Send">
</form>
</div>
<script type="text/javascript">
$('#send_data').live('click', (function(){
// Сначала присваеваем переменным значения из наших полей ввода
@zorgsoft
zorgsoft / auth.php
Created Feb 15, 2012
Authorization library and models for Codeigniter adn Doctrine ORM
View auth.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Auth Library
class Auth {
public function login($login, $password){
// Login user
$login_user = Doctrine::getTable('users')->findOneBy('login', $login);
if($login_user != NULL and $login_user->password == md5($password) ){
$this->session->set_userdata('isAuthorized', TRUE);
$this->session->set_userdata($login_user);
You can’t perform that action at this time.