This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sconfig | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Before saving inline hook (needs to be before grid instantiation) | |
| $.extend($.jgrid.inlineEdit, { | |
| ajaxRowOptions: { | |
| beforeSend: function (jqXHR, settings) { | |
| alert('Before Row Send'); | |
| } | |
| } | |
| }); | |
| // When using the default formatter 'actions', and hooking into after deleting -OR- saving the row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Source: http://stackoverflow.com/questions/10618196/how-to-find-a-asp-control-id-using-java-script | |
| // Get a control by id from javascript | |
| document.getElementById("<%= TextBox1.ClientId %>").value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Find element by id with wildcard | |
| var el = document.querySelector('[id^=side]'); | |
| // Matches --> <div id="sidebar">...</div> | |
| // Simulate click on href tag | |
| var el = document.querySelector('a'); | |
| window.location.href = el.href; | |
| // Add/Update query strings, and how to call it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Update packages | |
| apt-get update | |
| apt-get dist-upgrade | |
| sudo shutdown -h now | |
| sudo reboot | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # View current network configuration | |
| cat /etc/network/interfaces | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @using System.Configuration | |
| @using System.Web.Configuration; | |
| @using System.Reflection; | |
| @{ | |
| ViewBag.Title = "Session Info"; | |
| Layout = "~/Views/Shared/_Layout.cshtml"; | |
| } | |
| @{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HomeController : Controller | |
| { | |
| // Other methods... | |
| public ActionResult SessionInfo() | |
| { | |
| return this.View(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <add key="apiUrl" | |
| xdt:Locator="Match(key)" | |
| xdt:Transform="Remove" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class BaseController : System.Web.Mvc.Controller | |
| { | |
| public BaseController() | |
| { | |
| Initialize(); | |
| } | |
| protected void Initialize() | |
| { | |
| // ... |