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
q-=q<e;l-=l<=e; /* adj. window: delay bonus */ | |
d=Y=0; /* start iter. from scratch */ | |
X=myrand()&~M; /* start at random field */ | |
W(d++<n||d<3|| /*** min depth = 2 iterative deepening loop */ | |
z==8&K==I&&(N<T&d<98|| /* root: deepen upto time */ | |
(K=X,L=Y&S-9,d=3))) /* time's up: go do best */ | |
{x=B=X; /* start scan at prev. best */ | |
h=Y&S; /* request try noncastl. 1st*/ | |
P=d>2&&l+I?minimax(24-k,-l,1-l,-e,S,S,d-3):I; /* search null move */ | |
m=-P<l|R>35?d-2?-I:e:-P; /*** prune if > beta unconsidered:static eval */ |
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
<?php | |
class Payment | |
{ | |
private $provider; | |
private $test_mode; | |
public static $allowedProviders = array('authorize', 'paymenttest'); | |
const FREE_PLAN = 1; | |
const BASIC_MONTHLY_PLAN = 2; |
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
foreach ($mappings as $mapping) { | |
$companyLeadFieldID = $mapping['companyLeadFieldID']; | |
$companyLeadField = $this->companyleadfields_model->getByID($companyID, $companyLeadFieldID); | |
foreach($_POST as $key => $value) { | |
if ($mapping['postField'] == $key) { | |
$fieldName = $companyLeadField['fieldName']; | |
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
<html> | |
<head> | |
<title>My webpage!</title> | |
</head> | |
<body> | |
<h1>Welcome to the library</h1> | |
<p>Here's a list of books in our library!</p> | |
<ul> | |
<li>The Art of Zen - Alan Watts</li> | |
<li>The Jungle Book - That one guy</li> |
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 GoalView = (function(){ | |
var my = {}; | |
my.GoalCategory = Backbone.View.extend({ | |
render: function(category) { | |
var data = this.model; | |
data['goals'] = this.collection.filter(function(model) { | |
return model.attributes['category'] == data.category; | |
}); | |
var template = _.template($('#goalCategoryTpl').text(), data); |
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
require 'snoo' | |
require 'json' | |
require 'open-uri' | |
task :reddit do | |
@cfg = Rails.application.config | |
@after = nil | |
puts @cfg.minutes_between_posts.to_s + " minutes between posts... initializing @ #{Time.new()}" | |
replies = {} |
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() { | |
var goals = new GoalCollection([]); | |
console.log(goals.url); | |
var goalCategoryView = null; | |
var Router = Backbone.Router.extend({ | |
routes: { | |
":category": "category", | |
}, |
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
Go through the entirety of vimtutor (http://linuxcommand.org/man_pages/vimtutor1.html) | |
Learn how to use tmux (http://robots.thoughtbot.com/a-tmux-crash-course) | |
Learn how to install LAMP on ubuntu (php version 5.3 apache 2.2) | |
Get an older version of ubuntu (12.04 or earlier) http://releases.ubuntu.com/12.04/ | |
Read http://www.phptherightway.com/ | |
Go through this linux guide: http://tldp.org/LDP/intro-linux/html/ | |
Read about supervisor (we use it to control all of our daemons) http://supervisord.org/ | |
Read about gearman (this is how we make backend queues) http://gearman.org/ |
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> | |
<style> .main { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; } .signature { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; color: #5e5e5e; font-size: 10pt; } .tagline { color: #d4421a; } .recent { color: #198fd7 } .link { text-decoration: underline; } | |
</style> | |
</head> | |
<body><img src="http://www.messagegears.net/o/1/23295228/m15414-6237e9f7-b483-4abf-8eec-1f8ecd077edd/ntbafnyirf/terngwnxrf/pbz" width="1" height="1" /> | |
<div class="”editable" main="" .content”="" data-editable="”standard”"><p><span style="font-size: 12pt; font-family: arial, helvetica, sans-serif;">Hi Andrew,</span></p> | |
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">First of all, thanks for your interest in Great Jakes. I'd love to give you a call to discuss what we can do for you. Just send me your phone number and the best time to reach you. If possible, let me know a little bit about what you're looking for so I can be prepared with all the |
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
"Request Data:" | |
{ | |
"method":"getLead", | |
"params":{ | |
"id":"<a lead id>" | |
}, | |
"id":"<your request ID>", | |
} |
OlderNewer