Skip to content

Instantly share code, notes, and snippets.

View zenithtekla's full-sized avatar

ZeTek zenithtekla

  • Fictitious(FBN): ZetekLA
  • pristinekallio@gmail.com
View GitHub Profile
@zenithtekla
zenithtekla / bug_desc_api.php
Last active July 2, 2016 00:15
Description_API
<?php
# MantisBT - A PHP based bugtracking system
# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@zenithtekla
zenithtekla / app.js
Last active June 27, 2016 21:03
php-to-js-array
var app = angular.module('app', []);
app.controller('MainCtrl', function ($scope) {
// $scope.images = images;
$scope.images = JSON.parse(images_str);
// $scope.images = images;
});
<?php // print_p($t_list_attachments);?>
<div ng-app="myCarouselApp" class="show-grid">
<div ng-controller="CarouselCtrl" >
<?php echo '<div class="hidden no-print" id="image_list">'. json_encode($t_list_attachments).'</div>';?>
<div>
<uib-carousel active="active" interval="myInterval" no-wrap="noWrapSlides" class="bg-danger">
<uib-slide ng-repeat="slide in slides track by slide.id" index="slide.id" class="bg-warning">
<img ng-src="{{slide.image}}" style="margin:auto;">
<div class="carousel-caption">
<h4 class="text-success">Slide {{slide.id}}</h4>
@zenithtekla
zenithtekla / script.js
Created July 5, 2016 09:49
working script
// import modules
var express = require('express');
var mysql = require('mysql');
var app = express();
// implement connectionPool
var connection = mysql.createPool({
// properties ...
connectionLimit: 90, // only 90 queries at a time
host:'localhost',
@zenithtekla
zenithtekla / .gitignore
Last active July 11, 2017 17:59
ESP21 settings
# OS
# ===========
.DS_Store
ehthumbs.db
Icon?
Thumbs.db
# TERMINAL, TERMINUS
# ===========
*.stackdump
@zenithtekla
zenithtekla / default_light_sublime.xml
Last active July 21, 2016 21:35
some sublime styled keymaps for WebStorm
<keymap version="1" name="Default_some_sublime" parent="$default">
<action id="ActivateDBBrowserToolWindow">
<keyboard-shortcut first-keystroke="alt 8" />
</action>
<action id="CheckinProject">
<keyboard-shortcut first-keystroke="alt p" />
</action>
<action id="CloseContent">
<keyboard-shortcut first-keystroke="ctrl f4" />
<keyboard-shortcut first-keystroke="ctrl w" />
@zenithtekla
zenithtekla / delimiter
Created July 12, 2016 21:59
delimiter
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
@zenithtekla
zenithtekla / git.bash
Last active July 17, 2016 05:45
Some git commands
Deleting last commit
$ git reset HEAD^ --hard
$ git push -f origin master
$ git cherry-pick <rev-hash>
# Proceed with git push if shell message seems fine, Otherwise do git commit to ascertain if there are changes in files
# and resolve with git add, rm.
$ git commit
$ git push -f origin <branch|master>
@zenithtekla
zenithtekla / prototypal programming.js
Last active July 20, 2016 18:30
prototypal programming
/*
var productCategoryRouteConf = {
app: '',
routeTable: [],
// later all we add these
init : function(){},
addRoutes: function(){}
}
*/
Warning: a promise was created in a handler but was not returned from it
at Model.findAll (C:\Users\PhucTran\seanjs\node_modules\sequelize\lib\model.js:1347:18)
at Model.findOne (C:\Users\PhucTran\seanjs\node_modules\sequelize\lib\model.js:1519:34)
at exports.userByID (C:\Users\PhucTran\seanjs\modules\users\server\controllers\users\user.authorization.server.controller.js:20:8)
at paramCallback (C:\Users\PhucTran\seanjs\node_modules\express\lib\router\index.js:404:7)
at null.<anonymous> (C:\Users\PhucTran\seanjs\modules\users\server\controllers\admin.server.controller.js:140:7)
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at Promise.then (C:\Users\PhucTran\seanjs\node_modules\sequelize\lib\promise.js:21:17)
at exports.userByID (C:\Users\PhucTran\seanjs\modules\users\server\controllers\admin.server.controller.js:121:21)