Skip to content

Instantly share code, notes, and snippets.

View bangonkali's full-sized avatar
🏠
Working from home

Bangon Kali bangonkali

🏠
Working from home
View GitHub Profile
@bangonkali
bangonkali / mage\app\etc\modules\My_Module.xml
Created June 12, 2012 05:48
Magento Modules Development: Overriding
<?xml version="1.0"?>
<config>
<!--
<global>
<modules>
<catalog>
<class></class>
<rewrite></rewrite>
-->
@bangonkali
bangonkali / index.js
Created June 13, 2012 13:22
My.IIT COR Scheduler
// ==UserScript==
// @name Graphical Scheduler
// @namespace https://sites.google.com/site/kinalibangon/ventures/javascript/graphical-scheduler
// @description My.IIT Graphical Scheduler for COR
// @include http://x4150my.msuiit.edu.ph/my/student/cor.php
// @version 0.0.7
// ==/UserScript==
// subject/course counters.
var subjects = new Array();
@bangonkali
bangonkali / initattributes.php
Created June 16, 2012 22:57
Magento Initialize Attributes
<?php
$hh = 'localhost';
$un = 'username';
$db = 'database';
$pw = 'password';
$nl = '<br />'.PHP_EOL;
$size_id = 0;
$errors = array();
@bangonkali
bangonkali / ntpu.l
Created August 30, 2012 20:43
ECE 196: Still Under Construction
* Mao ni akoan gi try ug sumpay2 na code sa number 2. Ang level 1 lang na mosfet lang sa ang gitestingan.
*
* given ta atong code (which is below), ug mga parameters na table. Pero katong code, kai naa toi kulang na mga parameters some of them are listed here: http://j.mp/Nz9pM8 pero mas daghan ang nakalista diari: http://j.mp/QXteHx ga start sa page 48 ani na document (52 including title).
*
* for example wala nakalista sa code ang parameter sa COX, pero ani na file http://j.mp/NZjVfr nakalista ang solution unsaon pag derive sa cox given ang uban parameters na naa sa code. Perhaps I think the same ang methods pag kuha sa JS which is also a paramater that must be included on the code but was not, pero mrag sa JS kailangan ka ug AS ug AD na parameter which is not given sa code too.
*
* i have noted some probable solutions here. http://imgur.com/a/FN3bB And after each line of code below naay [b/a, p#] na indication sa comment. a means: http://j.mp/QXteHx and b means http://j.mp/Nz9pM8 . mga reference na s
@bangonkali
bangonkali / cascode_jo.sp
Created August 31, 2012 08:00
LAB 7 - ECE 196
cascode_jo
.option post probe
.lib 'C:\synopsys\rf018.l' TT
M1 nx nin 0 0 nch w=2u l=0.5u
M2 nout nb1 nx 0 nch w=2u l=0.5u
M3 nout nb2 ns1 ndd pch w=1u l=0.5u
M4 nref nb2 ns2 ndd pch w=1u l=0.5u
M5 ns1 nref ndd ndd pch w=0.5u l=0.5u
@bangonkali
bangonkali / partial.php
Created September 28, 2012 16:35
Some Code
$newitem['name'] = $this->clean($objPHPExcel->getActiveSheet()->getCell('B' . $row)->getValue());
$newitem['attrib'] = $this->clean($objPHPExcel->getActiveSheet()->getCell('D' . $row)->getValue());
if (!in_array($newitem['attrib'], $uniueattributes)) {
$uniueattributes[] = $newitem['attrib'];
}
$newitem['size'] = $this->clean($objPHPExcel->getActiveSheet()->getCell('F' . $row)->getValue());
@bangonkali
bangonkali / df.bat
Created December 2, 2012 22:29
Telerik Libraries - Visual Studio Build Event
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2012\Telerik.OpenAccess.Runtime.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\MySql.Data.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.Config.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.DataServices.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.ServiceHost.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.Windows.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.dll" $(TargetDir) /S /E /y
xcopy "C:\Program Files (x86)\Telerik\RadControls for WinForms Q3 2012\Bin40\*.dll" $(TargetDir) /S /E /y
@bangonkali
bangonkali / PIC18F4550lib.c
Last active December 12, 2015 00:08
Multiple Ultrasonic Distance Sensors on a Single PIC 18F4550.
#include "PIC18F4550lib.h"
void ___init_core___() {
ADCON1 = 0x0F; // page 268, disable analaog
CMCON = 0x07; // disable comparator
INTCON2 = 0x80; // disable pull up in port b
LATA = 0x00; // Make all output ports 0
LATC = 0x00; // Make all output ports 0
LATD = 0x00; // Make all output ports 0
@bangonkali
bangonkali / synopsys.sh
Created August 1, 2013 03:45
Environment Variables Synopsys Installation
# Design Compiler
pathmunge "/usr/synopsys/designcompiler/G-2012.06-SP2/bin"
export DESIGNCOMPILER="/usr/synopsys/designcompiler"
alias dc="dc_shell"
alias dv="design_vision"
# Synopsys Common Licensing Program
export SCL="/usr/synopsys/scl/11.4"
pathmunge "/usr/synopsys/scl/11.4/amd64/bin"
@bangonkali
bangonkali / login.js
Created August 7, 2013 18:43
I have implemented the suggestion of the person commenting here: http://techhunting.wordpress.com/2013/01/27/bootstrap-modal-in-meteorjs/#comment-56. I am using sessions. But I have a problem because even though the Modal shows, the problem is that it is not alway everytime that changes to the Session data using Session.set reflect directly to t…
// However, if i run the following code, i encounter a serious problem.
// Though everytime the modal is needed to be shown it shows properly.
// The problem is that the Session.set data that runs before showing
// the modal does not always appear when the modal is shown. Sometimes,
// what's shown is the previous Session.set. Sometimes the behaviour is
// as expected, but sometimes, it doesn't work.
// An example scenario would be when I login, and put in black username/email
// and password. The modal would show and ouput the Email or password is empty
// content, which is expected. But when i finally login successfully by closing,