Category Archives: Old Portfolio

This category is set so visitors can view the list of my works. It can either be a website, desktop application, and even designing.

Active Directory via C#

There is a requirement to perform CRUD operation on an Active Directory and we need to create it on C#. The following code will help an engineer accordingly:

Create

using (DirectoryEntry directoryEntry = new DirectoryEntry("LDAP:\\url\ou", "username", "password"))
                {
                    using (DirectoryEntry newUser = directoryEntry.Children.Add("CN=Name", "User"))
                    {
                        if (!DirectoryEntry.Exists(newUser.Path))
                        {
                            newUser.Properties["property1"].Add(propertyValue);
                            newUser.CommitChanges();
                            ret = true;
                        }
                    }
                }

Update

using (DirectoryEntry directoryEntry = new DirectoryEntry("LDAP:\\url\ou", "username", "password"))
                {
                    using (DirectorySearcher search = new DirectorySearcher(directoryEntry))
                    {
                        search.Filter = String.Format("(IdentifierProperty={0})", identifier);
                        search.PropertiesToLoad.Add("property1");
                        SearchResult result = search.FindOne();
                        if (result != null)
                        {
                            using (DirectoryEntry entryToUpdate = result.GetDirectoryEntry())
                            {
                                entryToUpdate.Properties["property1"].Value = "property1value";
                                entryToUpdate.CommitChanges();
                                ret = true;
                            }
                        }
                    }
                }

Delete

using (DirectoryEntry directoryEntry = new DirectoryEntry("LDAP:\\url\ou", "username", "password"))
                {
                    using (DirectorySearcher search = new DirectorySearcher(directoryEntry))
                    {
                        search.Filter = String.Format("(IdentifierProperty={0})", identifier);
                        search.PropertiesToLoad.Add("property1");
                        SearchResult result = search.FindOne();
                        if (result != null)
                        {
                            using (DirectoryEntry entryToUpdate = result.GetDirectoryEntry())
                            {
                                directoryEntry.Children.Remove(entryToUpdate);
                                directoryEntry.CommitChanges();
                                ret = true;
                            }
                        }
                    }
                }

MSSQL Grant Execute Stored Procedure only

There are cases that we only want to grant read-write only access then also enable users to execute stored procedure with in the SQL Server database.

In order to do this we will need to:

  1. Create a new Role named, db_exec_storedprocedure

    CREATE ROLE db_exec_storedprocedure
  2. Grant that role with execute stored procedure

    GRANT EXECUTE TO db_exec_storedprocedure
  3. Then add the user as a member of that role.

That’s it you can now grant specific permission to execute stored procedure.

God Bless!
Thanks,
Thomie

Visual Studio Extension -Ngrok

Ngrok is now widely being used. From simple web development up to complex development. Is hard to run Ngrok everytime you are coding specially when using IIS Express that if not configured to use a specific IP it will generate random port which is a hard to map.

Thankfully there is a plug-in for our beloved Visual Studio to integrate this.

Ngrok Extensions

With Ngrok Extension we only open our Visual Studio solution and navigate to Tool>Start ngrok Tunnel and it will create a tunnel for the websites under your solution.

Try it now!

God Bless!

Thanks,
Thomie

Ngrok – Free Web Tunneling

In the verge of today’s web development we encounter cases that in order to proceed we need to have a public accessible URL. Thankfully, Ngrok provide a free service to do this.

What it does is tunnel your machine to a Ngrok URL with a specific port. We just need to download the ngrok.exe from their website and run the command like

ngrok http 80


With this command your service on your local machine that is running on port 80 will be mapped and accessible publicly for FREE. For a full documentation view it here.

God Bless!

Thanks,
Thomie

DateTime not parsing MM/dd/yyyy correctly on Windows 10 on ASP .Net MVC

Have you experienced coding and all of a sudden when on windows 10 you experienced that MM/dd/yyyy is not a valid date? This is because of the culture that is default implemented on your device, in this case on my device with Windows 10 Pro. To cause of this is the machine is by default is using dd/MM/yyyy and in this case apps that we are developing is having this kind of issue.

Thank fully the fastest way to fix is via the web.config with the following code:

<system.web>

<globalization culture=”en-US” uiCulture=”en-US”/>

 

And then run again your application and it will now accept your MM/dd/yyyy.

Opencast, Your Free and Open Video Casting!

Hi There,

We are glad to invite you to our first Free service product, OpenCast. OpenCast is an online broadcasting websites that aim to help people broadcast freely and openly. The website is created using ASP.Net MVC, Entity Framework, SignalR, & OpenTok.

 

Feel Free to register now at http://opencast.info

God Bless!

Thanks,
Thomie

Mediafire API for C# + Resharper

 Hi There,

I have been searching on the net of a Mediafire API for C#. I gently saw this API from Google. It has a note that it needs Resharper so I think you need that plugin before you can use it. As for the testing I don’t have any Resharper yet so I can test it myself so I have decided to publish it here so you can use and try it. You may give some feed back of your trying and share it to the world!

Source: http://pastebin.com/Cj1syDss

Mirror Download: Mediafire API C# + Resharper

Thanks,

 

Timezone your DateTime

Hi there!

I have been wondering today on how to make your website created on ASP .Net  perfect to all timezone so that if a user view your website on another country the date and time of your website is set to their timezone. So lets start to Timezone your DateTime!

  1. First create a Website Project on your Visual Studio
  2. Add Reference to this DateTimeW DLL
  3. On your website there should be an AJAX – Server Interaction. The AJAX will pass the timezone of the client to the Server and the server will fetch the timezone and set all your date.

For a clear way of implementing this your can download the demo below.

Demo TimezoneDatetime

The Computer Science Web Team Tools

CS Web Team Tools

During my OJT I was given the spare time to create this tool that we can use on our organization for our activities. This is because we were done developing our project and waiting for the test runs to finish. So briefly here are the features of the site:

  1. ID Printing
  2. Seminar Registration
  3. Seminar Certificate Printing
  4. General Assembly Registration
  5. General Assembly Raffle Draw

 

 

The Adamson Chronicle Website

theadamsonchronicle.tk

theadamsonchronicle.tk

Here is another website I have developed together with my partner, Calbin Montalban.

Staging: http://theadamsonchronicle.tjsa.info

Live: http://theadamsonchronicle.tk

System : San Carlos Alumni Homecoming Registration System

San Carlos Alumni Homecoming Registration System

San Carlos Alumni Homecoming Registration System

This is a system that I have developed for a seminary, San Carlos Seminary, at Guadalupe here at Manila. I was given this privilege by my classmate, Eissa Bedural, who has a brother, Kuya Edric Bedural, studying at the said seminary.

System features

  1. Automatic Installation of Database Server
  2. Backup Database
  3. Remote Control View of Registration
  4. Summary Registrants
  5. ID Printing
  6. Transport to MS Excel
  7. Room Management

Website : Adamson University Computer Science

Website : http://adamsoncompsci.com

Adamson Computer Science Website

Adamson Computer Science Website

During my school days at college. I was given the privileged to developed the website of our department. The Computer Science Website.

It manages the following features:

  1. Online Announcements
  2. Online Lectures
  3. Shout Box
  4. Students Enrolled
  5. Accounts For Each Students
  6. Poll
  7. Jobs Available
  8. Download Wallpapers
  9. Download Documents

GAME : Typing Mania

Download: TJSAsTypingMania

TJSAsTypingMania

TJSAsTypingMania

This is another game that during my OJT I have experimented on the .Net Framework during our free time.

The goal of the game is to type the letters that will be shown to you in the shortest possible time.

WEBSITE : Transportation Method Using Modified Stepping Stone

WEBSITE : http://transpomodi.tk

During my school days, I, together with my co leagues, had develop one website for Operational Research.  The said website was develop as part of their finals for the said subject.

Its main goal is to easily compute optimized number of items to be delivered to a particular location. Or what ever the purpose of using the transportation method using modified stepping stone in the area of Operational Research.

Again you are free to use the website for any purpose. Hope it help you.

The said website were developed by:

  • Thomie Jose San Agustin
  • Calbin Montalban
  • Kevin Stephen Muñoz

 

GAME : MouseAttack v1.0

Download: TJSAsMouseAttack

During my OJT I have experimented on the .Net Framework to develop some games during our free time.

One the games I have develop is the MouseAttack. Its a game were you need to avoid some falling objects in order to get more points. The game was developed for a little time, but I hope you like it.