Skip to content

Instantly share code, notes, and snippets.

@hlmn
hlmn / Rupiah.as
Created June 9, 2017 06:59 — forked from faisalman/Rupiah.as
Konversi Angka ke format Rupiah & vice versa (C#, PHP, JavaScript, ActionScript 3.0)
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
@hlmn
hlmn / Collection.php
Created November 4, 2017 04:03 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Support;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection as BaseCollection;
class Collection extends BaseCollection {
public function paginate( $perPage, $total = null, $page = null, $pageName = 'page' )
{
@hlmn
hlmn / Laravel PHP7 LEMP AWS.md
Created March 6, 2018 11:25 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@hlmn
hlmn / index.html
Created March 27, 2018 11:51 — forked from adunkman/index.html
Relay messages from RabbitMQ to a browser using Socket.io
<!DOCTYPE html>
<html>
<head>
<script src="/socket.io/socket.io.js"></script>
<script>
(function () {
var onMessage = function (data) {
// Do something with the message data
};
@hlmn
hlmn / server.js
Last active April 24, 2018 03:36
server.js
var client = {};
var ruanganlist = {};
var ipmesin = {};
let webServerPort;
var net = require('net');
var HOST = '127.0.0.1';
var PORT = 8000;
var workerFlag = 0;
var axios = require('axios');
var cek=0;
@hlmn
hlmn / client.js
Created April 24, 2018 03:37
client.js
/*jshint esversion: 6 */
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')