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
| set noautoindent | |
| set ignorecase | |
| set shell=sh | |
| set showmatch | |
| set showmode | |
| set shiftwidth=4 | |
| set tabstop=4 | |
| set edcompatible | |
| set nocompatible | |
| set magic |
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; |
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
| // icon | |
| // http://www.emoji-cheat-sheet.com/ | |
| // for test use direct message e.g. @kiichi | |
| let payload = "payload={\"channel\": \"#dev\", \"username\": \"bot\", \"icon_emoji\":\":calling:\", \"text\": \"hello\"}" | |
| let data = (payload as NSString).dataUsingEncoding(NSUTF8StringEncoding) | |
| if let url = NSURL(string: "https://hooks.slack.com/services/(your slack incoming webhook url)") | |
| { | |
| var request = NSMutableURLRequest(URL: url) | |
| request.HTTPMethod = "POST" |
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
| var http = require('http'); | |
| var fs = require('fs'); | |
| var PDFDocument = require('pdfkit'); | |
| function handleRequest(req, res){ | |
| var doc = new PDFDocument(); | |
| doc.pipe(res); | |
| doc.fontSize(25).text('pdf server - requested URL:' + req.url, 100, 80); | |
| doc.save().moveTo(100, 150).lineTo(100, 250).lineTo(200, 250).fill("#FF3300"); | |
| doc.circle(280, 200, 50).fill("#6600FF").restore(); |