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
<script> | |
$(document).ready(function() { | |
$("#btnSubmit").click(function(e) { | |
e.preventDefault(); | |
$.ajax({ | |
type: "POST", | |
dataType: "json", | |
url: "log-on", | |
data: $("#logonForm").serialize(), | |
success: function (response) { |
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
namespace DownloadStream.Controllers | |
{ | |
using System.Web; | |
using FubuMVC.Core.Behaviors; | |
public class JpegController | |
{ | |
public DownloadFileModel Stream() | |
{ | |
return new DownloadFileModel |
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
require 'rubygems' | |
require 'albacore' | |
require 'rake/clean' | |
CONFIGURATION = 'Release' | |
BUILD_DIR = File.expand_path('binaries/') | |
XUNIT_COMMAND = 'xunit/xunitmono.sh' | |
CLEAN.include(FileList[File.join(BUILD_DIR, '*')]) | |
desc "Compiles solution" |
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 | |
class CacheStore | |
{ | |
const MEMCACHE = 'Memcache'; | |
static private $servers = NULL; | |
static function setServer($type, $server, $port) { | |
if (class_exists(self::MEMCACHE)) { | |
if (self::$servers[$type] != 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
ENV["WATCHR"] = "1" | |
system 'clear' | |
def growl(message) | |
growlnotify = `which growlnotify`.chomp | |
title = "Watchr Test Results" | |
image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
system %(#{growlnotify} #{options} &) | |
end |
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
class Base extends Model { | |
static $config = "default"; | |
} | |
class User extends Base { | |
static $collection = "user"; | |
protected static $attrs = array( | |
'first_name' => array( 'type' => 'string' ), | |
'last_name' => array( 'type' => 'string' ), |
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
{ | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/daylerees-themes/Laravel.tmTheme", | |
"draw_indent_guides": false, | |
"font_face": "Source Code Pro", | |
"font_options": | |
[ | |
"subpixel_antialias" | |
], | |
"font_size": 15.0, |
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
require 'mongoid' | |
Mongoid.load!("mongoid.yml", environment = "development") | |
class Artist | |
include Mongoid::Document | |
field :name, type: String | |
embeds_many :instruments | |
end |
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
request('https://news.ycombinator.com', function (error, response, html) { | |
console.log(response); | |
if (!error && response.statusCode == 200) { | |
var $ = cheerio.load(html); | |
$('span.comhead').each(function(i, element){ | |
var a = $(this).prev(); | |
console.log(a.text()); | |
}); | |
} | |
}); |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
protractor_webdriver: { | |
local: { | |
options: { | |
path: '', | |
command: 'webdriver-manager start', | |
}, | |
}, |
OlderNewer