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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| <html> | |
| <body style="background-color:gray"> | |
| <div class="col-md-6 col-md-offset-3"> | |
| <p class="lead ultra-bold" style="color: #fff; text-align: center; margin-top: 17px; font-size: 36px;"> | |
| <span id="ct-days"></span><span style="color: #b5e2e4;">DAYS</span> | |
| <span id="ct-hours"></span><span style="color: #b5e2e4;">HOURS</span> | |
| <span id="ct-mins"></span><span style="color: #b5e2e4;">MINS</span> | |
| </p> | |
| </div> | |
| <script> |
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
| //-------------------------------------------------------------------------------------------------- | |
| // show benchmark result of function | |
| // e.g. benchMe(heavyFunc,null,5) | |
| function benchMe(myFunc, myArgs, cnt){ | |
| if (!cnt || cnt <= 0){ | |
| cnt = 1; | |
| } | |
| var startTime = (new Date()).getTime(); | |
| for (var i=0; i<cnt; i++){ | |
| myFunc(myArgs); |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Jint; | |
| //https://github.com/sebastienros/jint | |
| namespace JintTest { | |
| public class Person { | |
| public string Name; |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Data; | |
| using System.Data.Entity; | |
| using System.Data.Entity.Validation; | |
| using System.Data.Entity.InfrastMyAppructure; | |
| using System.Configuration; | |
| namespace MyCompany.HR { |
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
| export SVN_EDITOR=vim | |
| export PATH=$PATHexport PATH=$PATH::/Applications/MAMP/Library/bin/ | |
| # Setting PATH for Python 2.7 | |
| # The orginal version is saved in .bash_profile.pysave | |
| PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" | |
| export PATH | |
| alias less='less -r' | |
| alias rm='rm -i' |
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
| ##How to tune up javascript | |
| Your app is slow? Try this below. | |
| 1. Use Chrome Prifle | |
| 1. Run the profiler first | |
| 1. Build a hypothsis | |
| 1. Apply change | |
| 1. Judge if it's improve it (or worth to change to take a risk. e.g. drawback in readability) |
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
| <?php | |
| //========================================================================================== | |
| // iSeismometer Data Receiver version 1.0 | |
| // I released this program as public domain. Feel free to use this at your own risk. | |
| // - by Kiichi 2009/02/16 | |
| //========================================================================================== | |
| /* | |
| CREATE TABLE IF NOT EXISTS `signals` ( | |
| `signal_id` int(11) NOT NULL auto_increment, | |
| `device_id` varchar(50) NOT NULL, |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Collections; | |
| namespace MyTest | |
| { | |
| public class eStatus | |
| { |
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; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Collections.Generic; | |
| using System.Web.Mvc; | |
| namespace MoqTest { | |
| public class Patient { | |
| public string FirstName; | |
| public string LastName; |
OlderNewer