Skip to content

Instantly share code, notes, and snippets.

View bunlongheng's full-sized avatar
💭
🍔 Eat. 🛌 Sleep. 💻 Code --> ☕️🧑🏻‍💻

Bunlong Heng bunlongheng

💭
🍔 Eat. 🛌 Sleep. 💻 Code --> ☕️🧑🏻‍💻
View GitHub Profile
@bunlongheng
bunlongheng / skills.index.blade.php
Last active May 2, 2018 21:38
Blade with Angular Integration
@extends('layouts.be.master')
@section('content')
<script type="text/javascript">
myApp.directive('myEnter', function () {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
<script type="text/javascript">
//Edit Mode
$('body').on('click', '.account-edit', function () {
var id = $(this).data("id");
console.log(id);
//Declare Variables
@extends('layouts.internal.master')
@section('content')
<style type="text/css">
.btn-js{
display: none;
}
</style>
@bunlongheng
bunlongheng / my_network_page.blade.php
Last active May 2, 2018 21:39
Wifi SSDI, Passphrase, and State
// MHN Network Sub-Pages
public function create() {
$cpe_mac = Request::segment(1);
$p_24_wi = 10001 ;
$g_24_wi = 10101 ;
$p_50_wi = 10002 ;
$g_50_wi = 10102 ;
<?xml version="1.0"?>
<inputList>
<inputConfig type="joystick" deviceName="GPIO Controller 1" deviceGUID="15000000010000000100000000010000">
<input name="a" type="button" id="1" value="1" />
<input name="b" type="button" id="0" value="1" />
<input name="hotkey" type="button" id="6" value="1" />
<input name="pagedown" type="button" id="5" value="1" />
<input name="pageup" type="button" id="4" value="1" />
<input name="select" type="button" id="6" value="1" />
<input name="start" type="button" id="7" value="1" />
import os
print ("______________\n")
print " 1.GET "
print " 2.POST "
print " 3.PUT "
print " 4.DELETE "
print ("______________\n")
<div class="table-responsive" style="margin-bottom: 0;">
<table class="table" id="account-table">
<thead>
<tr>
<th>#</th>
<th>Account ID</th>
<th>Customer Type</th>
<th>Name</th>
<th>Email</th>
const jwt = require('jwt-express');
const bodyParser = require('body-parser');
const controllers = require('../controllers');
module.exports = (app) => {
app.get('/', (req, res) => res.status(200).send({
message: 'Welcome to the API!',
}));
const FortinetService = require("../services").Fortinet;
module.exports = (config, jwtDecode) => {
let fortinet = {};
/**
* Login
*
* @return {object} response
*/
fortinet.login = async (req, res, next) => {
const Account = require('../services').Account;
const FortinetService = require("../services").Fortinet;
const SSCService = require("../services").SSC;
const kue = require('kue');
const dotenv = require('dotenv').config();
const queue = kue.createQueue({redis: process.env.REDIS_URL});
module.exports = (config) => {