Skip to content

Instantly share code, notes, and snippets.

View gamalan's full-sized avatar
🏃‍♂️
On sport mode, and build something related to sports

Gamalan gamalan

🏃‍♂️
On sport mode, and build something related to sports
View GitHub Profile
@gamalan
gamalan / nginx.conf
Created May 1, 2020 10:16 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@gamalan
gamalan / stack.yml
Last active September 5, 2019 07:06
version: '3.7'
services:
adminer:
image: adminer
ports:
- 8080:8080
environment:
ADMINER_PLUGINS: 'tables-filter tinymce enum-option enum-types'
@gamalan
gamalan / mail.php
Created August 30, 2018 02:18
SwiftMailer DKIM Sign
<?php
require 'vendor/autoload.php';
$transport = Swift_SmtpTransport::newInstance('localhost', 25);
$mailer = Swift_Mailer::newInstance($transport);
// Read private key file
$privateKey = file_get_contents('/path/to/privatekey');
$domainName = 'example.com';
$selector = 'default';
$signer = new Swift_Signers_DKIMSigner($privateKey, $domainName, $selector);
@gamalan
gamalan / language_detection.py
Created August 11, 2018 13:43
Multi Language Stemmer
import sys
try:
from nltk import wordpunct_tokenize
from nltk.corpus import stopwords
except ImportError:
print('[!] You need to install nltk (http://nltk.org/index.html)')
class LanguageDetection(object):
@gamalan
gamalan / keybase.md
Created October 5, 2017 02:03
Keybase

Keybase proof

I hereby claim:

  • I am gamalan on github.
  • I am gamalan (https://keybase.io/gamalan) on keybase.
  • I have a public key ASCuLbxSzEfsAFNCvm5bPlZrQOa1xnCO6A04skixSeam0go

To claim this, I am signing this object:

@gamalan
gamalan / Payment_Adapter_Skrill.php
Created January 13, 2016 10:32
Skrill Adapter for BoxBilling
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE