Skip to content

Instantly share code, notes, and snippets.

Avatar
🙂

Hari K T harikt

🙂
View GitHub Profile
@harikt
harikt / aurarouter.nginx.conf
Last active Jun 22, 2017
nginx configuration for Aura.Router version 3.x : https://github.com/auraphp/Aura.Router/tree/3.x
View aurarouter.nginx.conf
server {
listen 80;
server_name aurarouter.com;
root /var/www/projects/aura-router-test;
index index.php index.html index.htm;
location / {
try_files $uri @rewriteapp;
}
@harikt
harikt / APACHE_content-security-policy.conf
Created Apr 18, 2017 — forked from wkhayrattee/APACHE_content-security-policy.conf
APACHE to NGINX | content-security-policy.conf
View APACHE_content-security-policy.conf
# REF: https://github.com/h5bp/server-configs-apache/blob/master/src/security/content-security-policy.conf
<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
Header unset Content-Security-Policy
</FilesMatch>
</IfModule>
@harikt
harikt / gist:4cece5f1059c8e1aef167248f0f56038
Created Mar 31, 2017
Jio failed to connect to WebLogic Messaging Bridge
View gist:4cece5f1059c8e1aef167248f0f56038
Failure of server APACHE bridge:
No backend server available for connection: timed out after 10 seconds or idempotent set to OFF or method not idempotent.
@harikt
harikt / example.php
Created Mar 21, 2017 — forked from hikari-no-yume/example.php
function chaining for PHP 7
View example.php
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
View gist:082816eb131f0afcd4b87dc251266da5

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@harikt
harikt / Remove all git tags
Created Mar 19, 2017 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
View Remove all git tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@harikt
harikt / JWTKiller.php
Created Mar 15, 2017 — forked from paragonie-scott/JWTKiller.php
PHP 7.2 Replacement for JWT
View JWTKiller.php
<?php
declare(strict_types=1);
use ParagonIE\ConstantTime\Base64UrlSafe;
class JWTKiller
{
public static function sign(string $message, Key $key): string
{
$mac = sodium_crypto_auth($message, $key->getRaw());
View module.md

I am following Creating and enabling a module

What I need is get the instance of Hkt\Psr7Asset\AssetLocator from container and do some specific things on the object. This need to be done for all routes.

Is it possible to register a pipe in ConfigProvider class below ?.

<?php
namespace Hkt\Psr7AssetExample;
View ioslocaleidentifiers.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
View composer.json
{
"require": {
"aura/di": "^3.2"
}
}