Skip to content

Instantly share code, notes, and snippets.

Avatar

Bunlong Heng bunlongheng

View GitHub Profile
@bunlongheng
bunlongheng / Gruntfile.js
Last active Mar 1, 2019
I used this build system for my site : www.bunlongheng.com
View Gruntfile.js
/*
Grunt installation:
-------------------
npm install -g grunt-cli
npm install -g grunt-init
npm init (creates a `package.json` file)
Project Dependencies:
---------------------
View mp-imagelinker.js
'use strict';
define(['jquery'], function($) {
$(function() {
/*=================================
= Variables =
=================================*/
View report-header.js
'use strict';
define(['jquery', 'moment'], function($, moment) {
$(function() {
// Teacher Report
var report_type_car = $('#as-report-type-car');
var report_type_cdr = $('#as-report-type-cdr');
var report_type_title = $('#as-report-type-title');
View policy-factory
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) => {
View controller.fortinet.js
const FortinetService = require("../services").Fortinet;
module.exports = (config, jwtDecode) => {
let fortinet = {};
/**
* Login
*
* @return {object} response
*/
fortinet.login = async (req, res, next) => {
View index.js
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!',
}));
View table
<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>
View curl
import os
print ("______________\n")
print " 1.GET "
print " 2.POST "
print " 3.PUT "
print " 4.DELETE "
print ("______________\n")
View es_input.cfg
<?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" />
@bunlongheng
bunlongheng / my_network_page.blade.php
Last active May 2, 2018
Wifi SSDI, Passphrase, and State
View my_network_page.blade.php
// 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 ;