Skip to content

Instantly share code, notes, and snippets.

View andrejuseu's full-sized avatar

Andrejus andrejuseu

View GitHub Profile
@weismannweb
weismannweb / cache_category_data.xml
Last active April 23, 2024 12:45
Caches category data for Opencart 3.0 to make it faster. Opencart installs with alot of categories are really slow. http://forum.opencart.com/viewtopic.php?f=161&t=126241
<modification>
<id>Cache category data to speed up page load for store with many categories and sub categories.</id>
<version>1.0.1</version>
<vqmver>2.3.2</vqmver>
<author>Weismann Web - www.weismannweb.com</author>
<file name="catalog/controller/extension/module/category.php">
<operation>
<search position="after"><![CDATA[
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 2, 2024 20:44
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@oquirozm
oquirozm / .gitlab-ci.yml
Created May 18, 2017 10:27
This is a .yml file to setup up ftp deployment in GitLab. Super awesome. Remember to set up the environmental variables.
deploy:
script:
- apt-get update -qq && apt-get install -y -qq lftp
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
only:
- master
@visitdigital
visitdigital / webhook.php
Last active September 20, 2022 02:51
Very Simple Facebook Chat Bot PHP Webhook Script Example
<?php
$challenge = $_REQUEST['hub_challenge'];
$verify_token = $_REQUEST['hub_verify_token'];
// Set this Verify Token Value on your Facebook App
if ($verify_token === 'testtoken') {
echo $challenge;
}
$input = json_decode(file_get_contents('php://input'), true);
@evaqas
evaqas / skaiciai_zodziais.php
Last active June 23, 2023 11:48
Skaičiai žodžiais, suma žodžiais
<?php
function skaicius_zodziais( $skaicius ) {
// neskaiciuosim neigiamu ir itin dideliu skaiciu (iki milijardu)
if ( $skaicius < 0 || strlen( $skaicius ) > 9 ) return;
if ( $skaicius == 0 ) return 'nulis';
$vienetai = array( '', 'vienas', 'du', 'trys', 'keturi', 'penki', 'šeši', 'septyni', 'aštuoni', 'devyni' );
@hardiksondagar
hardiksondagar / index.html
Last active March 7, 2018 12:27
Chrome desktop Notification example
<button onclick="notifyMe()">Notify me!</button>
<html>
<head>
<title>Step progress bar</title>
<style type="text/css">
.container {
width: 100%;
}
.progressbar {
counter-reset: step;
}
@256cats
256cats / composer.json
Last active May 28, 2024 19:18
Web scraping ReactPHP Curl Proxies, curl multi example, scraping news ycombinator, explanation here: http://256cats.com/fast-scraping-with-reactphp-curl-proxies/
{
"require": {
"khr/react-curl": "~2.0",
"sunra/php-simple-html-dom-parser": "~1.5"
}
}
@ryandemmer
ryandemmer / gist:13c742e547bc8cba6d51
Last active May 20, 2017 12:04
VIES VAT Validator
public function validateVAT($code, $vat) {
if ($code === "GR") {
$code = "EL";
}
try {
$client = @new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");
} catch (SoapFault $e) {
return -1;
}
@rxaviers
rxaviers / gist:7360908
Last active July 5, 2024 04:46
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: