Skip to content

Instantly share code, notes, and snippets.

View adamasantares's full-sized avatar
🎯
Focusing

Konstantin Kutsevalov adamasantares

🎯
Focusing
View GitHub Profile
@adamasantares
adamasantares / test
Last active October 11, 2018 05:01
Quick test blank for PHP
#!/usr/bin/env php
<?php
// https://gist.github.com/adamasantares/e554d3bd8e00268911c98f1f1d293899
// change main script name to required and put it to web root of project
define('MAIN_SCRIPT', 'index.php');
$_GET = [
//'param' => 'value',
];
$_POST = [
//'param' => 'value',
@adamasantares
adamasantares / bootstrap-modals.jquery.js
Created October 10, 2016 09:47
Simple Alert and Question modals for Bootstrap & jQuery
/**
* jQuery Bootstrap modals (Alert and Question).
*
* jModal.Alert("Hello user", "Welcome!");
* jModal.Question("I'll install some stupid app. Are you agree?", "Ask", ["yes-green","no-red"], function(button, data) {
* if (button == "no") {
* jModal.Alert("I don't care about your answer " + data.ha + "!", "Warning");
* }
* }, {"ha":"HAHAHA"});
*
@adamasantares
adamasantares / .gitignore
Created February 12, 2015 15:42
.gitignore for Joomla 3.3
/.gitignore
/.htaccess
/administrator/cache/*
/administrator/components/com_admin/*
/administrator/components/com_ajax/*
/administrator/components/com_tags/*
/administrator/components/com_banners/*
/administrator/components/com_cache/*
/administrator/components/com_postinstall/*
/administrator/components/com_joomlaupdate/*
@adamasantares
adamasantares / scriptpath.js
Last active May 16, 2021 13:11
__FILE__ and __DIR__ in JavaScript
/**
* __DIR__ & __FILE__ for JavaScript (was tested in IE 7-10)
* This definition must be inserted at root of script file, outside of any function.
*/
(function(w,d){
var u=null;
w.__FILE__=(function(){
try{u();}catch(err){
if(err.stack){