This file contains 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
#!/usr/bin/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |
This file contains 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 React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Coverflow = require('react-coverflow'); | |
var fn = function () { | |
/* do you want */ | |
} | |
ReactDOM.render( | |
<Coverflow |
This file contains 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
(function() { | |
function runScripts() { | |
var bodyScripts = 'body script:not([src])'; | |
var count = 0; | |
Array.prototype.forEach.call(document.querySelectorAll(bodyScripts), function setJSXType(element) { | |
if (count++ === 0) { | |
var res = ["http://fb.me/react-with-addons-0.11.2.js", "http://fb.me/JSXTransformer-0.11.2.js"]; | |
for (r in res) { | |
var tag = document.createElement('script'); |
This file contains 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 gulp = require("gulp"), | |
connect = require("gulp-connect"), | |
less = require("gulp-less"), | |
react = require("gulp-react"), | |
watch = require("gulp-watch"), | |
jade = require("gulp-jade"), | |
clean = require("gulp-clean"); | |
This file contains 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
#example |
This file contains 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
<?xml version="1.0"?> | |
<!-- Web.Config Configuration File --> | |
<configuration> | |
<system.webServer> | |
<modules runAllManagedModulesForAllRequests="true"/> | |
<staticContent> | |
<remove fileExtension=".svg" /> | |
<remove fileExtension=".eot" /> | |
<remove fileExtension=".woff" /> | |
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> |
This file contains 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 HttpResponseMessage PutGame(int id, Game game) | |
{ | |
if (ModelState.IsValid && id == game.Id) | |
{ | |
var g = db.Games.Find(id); | |
g.InjectFrom(game); | |
g.ModifyOn = DateTime.Now; | |
game.InsertOn = DateTime.Now; | |
try |
This file contains 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.Globalization; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace CoolProject | |
{ | |
public class NewViewEngine : RazorViewEngine |
This file contains 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
1. 安裝完成 CentOS 之後設定 VMWare 網路連線為 Bridge | |
2. vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
3. 編輯內容如下 | |
DEVICE=eth0 | |
TYPE=Ethernet | |
HWADDR=00:0C:29:1B:3C:33 | |
UUID=d1f10f9c-9393-45db-950d-5d8d49c9bf88 | |
ONBOOT=yes | |
BOOTPROTO=static | |
NM_CONTROLLED=yes |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Helo, Backbone View</title> | |
<style> | |
#container { | |
padding:20px; | |
border:1px solid #333; | |
width:400px; } |