Skip to content

Instantly share code, notes, and snippets.

View ApOgEE's full-sized avatar
💭
code n learn

M. Fauzilkamil Zainuddin ApOgEE

💭
code n learn
View GitHub Profile
@ApOgEE
ApOgEE / controller.php
Created October 29, 2012 19:15 — forked from og-shawn-crigger/controller.php
Valums AJAX File Uploader for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Ajax_uploader extends CI_Controller {
// ------------------------------------------------------------------------
/**
* Array of allowed file extensions to upload.
*
* @var array
@ApOgEE
ApOgEE / parse_xlsx.php
Created March 14, 2018 20:03 — forked from searbe/parse_xlsx.php
Parse simple XLSX in PHP with SimpleXML and ZipArchive
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/
@ApOgEE
ApOgEE / APOGEE_NOTE.md
Last active May 2, 2018 05:58
Bash - Create tar.gz file with exclude list

Bash - How to create tar gz file with exclude list

Hi there...

I made this gists for my personal note as I keep on forgetting commands. Perhaps it may be useful for you too. Feel free to leave your comments.

Assume you already know the command to create tar gz archive. Here is the command to include a hidden file and exclude a list of files and folders.

$ tar -zcvf ../myfile.tar.gz * .one_hidden --exclude-from=../myexclude.list
@ApOgEE
ApOgEE / nginxproxy.md
Created September 12, 2019 06:44 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

Keybase proof

I hereby claim:

  • I am apogee on github.
  • I am apogeek (https://keybase.io/apogeek) on keybase.
  • I have a public key ASDDzNwiw2HefHJ5WMShzm2ivXs9Po7hN5A_Mjc5qJE6ngo

To claim this, I am signing this object:

@ApOgEE
ApOgEE / nginx.repo
Created September 17, 2020 07:25
rhel/centos nginx repo
[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1

Keybase proof

I hereby claim:

  • I am apogee on github.
  • I am apogeek (https://keybase.io/apogeek) on keybase.
  • I have a public key ASAm-oTIIBujA0DhsJF30DMhraW7QuiUQNpQz91fAtAIMAo

To claim this, I am signing this object:

@ApOgEE
ApOgEE / twint_test.py
Created January 22, 2021 15:23
Twint DB testing Script
import twint
import os
'''
twint_test.py - Twint DB testing Script
'''
def test_db(c, run):
print("[+] Beginning DB test in {}".format(str(run)))
c.Database = "test_twint.db"
@ApOgEE
ApOgEE / README.md
Last active September 29, 2021 19:24
Centos 8, RockyLinux 8 - Install Elasticsearch 7.x From Repo

Centos8 - Install Elasticsearch 7.x From Repo

  1. Download and add this file to /etc/yum.repos.d

    curl -o /etc/yum.repos.d/elasticsearch.repo \
    https://gist.githubusercontent.com/ApOgEE/62a09a4cbe31e7a75abb67aced271daa/raw/bbb0331ea7afad125c199c76c674dbbf942343f6/elasticsearch.repo
    

or

select (mytext ~ '^([0-9]+[.]?[0-9]*|[.][0-9]+)$');