Skip to content

Instantly share code, notes, and snippets.

View intruxxer's full-sized avatar

Ali Fahmi intruxxer

  • PT SOLUSI INFOTECH SEMESTA INDONESIA
  • Jakarta
View GitHub Profile
@intruxxer
intruxxer / openssl.md
Created June 18, 2018 02:52 — forked from NoMan2000/openssl.md
Common OpenSSL Commands with Keys and Certificates

Common OpenSSL Commands with Keys and Certificates

SSL Info

Generate RSA private key with certificate in a single command

openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar

Generate Certificate Signing Request (CSR) from private key with passphrase

openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar

@intruxxer
intruxxer / nginx-websocket-proxy.conf
Created September 7, 2017 12:14 — forked from uorat/nginx-websocket-proxy.conf
Nginx Reverse Proxy for WebSocket
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;
@intruxxer
intruxxer / camelCase.js
Last active June 19, 2017 15:28 — forked from johnsmith17th/camelCase.js
To convert string to camel case in javascript.
//Original
//e.g. my life is good => MyLifeIsGood
function toCamelCase(str) {
return str.toLowerCase().replace(/(?:(^.)|(\s+.))/g, function(match) {
return match.charAt(match.length-1).toUpperCase();
});
}
//Forked: Capable to Handle > 1 word/Phrase
//e.g. my life is good => My Life Is Good
╔═══════════════════════╦═════════════╦════════════╦══════════════╦════════════╦════════════╗
║ PHP Project ║ Classes ║ Methods ║ Properties ║ Functions ║ Variables ║
╠═══════════════════════╬═════════════╬════════════╬══════════════╬════════════╬════════════╣
║ Akelos Framework ║ PascalCase ║ camelCase ║ camelCase ║ lower_case ║ lower_case ║
║ CakePHP Framework ║ PascalCase ║ camelCase ║ camelCase ║ camelCase ║ camelCase ║
║ CodeIgniter Framework ║ Proper_Case ║ lower_case ║ lower_case ║ lower_case ║ lower_case ║
║ Concrete5 CMS ║ PascalCase ║ camelCase ║ camelCase ║ lower_case ║ lower_case ║
║ Doctrine ORM ║ PascalCase ║ camelCase ║ camelCase ║ camelCase ║ camelCase ║
║ Drupal CMS ║ PascalCase ║ camelCase ║ camelCase ║ lower_case ║ lower_case ║
║ Joomla CMS ║ PascalCase ║ camelCase ║ camelCase ║ camelCase ║ camelCase ║

Sublime text 3 (Build 3114) license key, these all tested available on 2016/05/13

—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@intruxxer
intruxxer / Instructions
Created May 18, 2016 09:44 — forked from philbirnie/Instructions
Steps to Combine Wordpress and Codeigniter when CI is in a subdirectory of Wordpress
Instructions
1. Add MY_url_helper.php to CI_directory/application/helpers
2. If the CI app is already built, convert any references to *site_url* in your CI application (aside from the system directory) to the new namespaced function, ci_site_url.
This step prevents Wordpress' site_url function from overwriting CIs. Because both functions are global and CI checks to make sure that site_url has not been set. Once we load the WP bootstrap file, it will have been defined, so CI's function wll never load.
3. Add Wordpress' bootstrap file into CI_directory/index.php right above CI's bootstrap file.
4. Update wp-includes/load.php *(this is necessary if you are using CI's sessions - Wordpress mangles CI's cookies using with magic quotes. (There may be an upgrade-proof way to do this.)
@intruxxer
intruxxer / hhvm-codeigniter
Created December 4, 2015 04:54
Hiphop-php HHVM working with Codeigniter and Nginx
I managed to make Codeiniter work with HHVM, using
nginx as a proxy. My problem was that hhvm has problems
with path_info, so I was not able to run /index.php/controller/action or
/controller/action/params -> /index.php/controller/action.params.
I used nginx as a proxy to hhvm. I changed the way codeigniter process
the url. Steps bellow:
Cleaned my HHVM .hdf file:
Server {
@intruxxer
intruxxer / codeigniter-apache-hhvm.md
Created December 4, 2015 04:53 — forked from shivaas/codeigniter-apache-hhvm.md
CodeIgniter with Apache & HHVM as FastCGI

Apache Configuration:

<VirtualHost *:80>
  ServerName blah.com

  DirectoryIndex index.html index.php
  ProxyRequests On
  ProxyPreserveHost On
  ProxyVia full
@intruxxer
intruxxer / word_country_data.sql
Last active July 28, 2016 20:03 — forked from jaconza/word_country_data.sql
MySQL script for creation and population of country, city and countryLanguage tables with the most popular cities and countries already inserted.
-- MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686)
--
-- Host: 127.0.0.1 Database: world
-- ------------------------------------------------------
-- Server version 5.1.51-debug-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
@intruxxer
intruxxer / pom.xml
Last active August 29, 2015 14:22 — forked from codahale/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- none yet -->