Skip to content

Instantly share code, notes, and snippets.

commit 2232eebb66837edb93b8f96d582c645a8a91f981
Author: Johan Lundström <johanlunds@gmail.com>
Date: Mon Feb 23 20:45:42 2015 +0100
WIP breakpoints (buggy)
diff --git a/lib/breakpoint-manager.coffee b/lib/breakpoint-manager.coffee
new file mode 100644
index 0000000..4ae0165
--- /dev/null
diff --git a/suitescripts/models/customer.js.coffee b/suitescripts/models/customer.js.coffee
index d361731..e736bcd 100644
--- a/suitescripts/models/customer.js.coffee
+++ b/suitescripts/models/customer.js.coffee
@@ -18,8 +18,8 @@ Hook.get('lead').validate('phone', Validator.phone)
Hook.get('prospect').rewrite('custentity_ssn', Validator.rewrite_org_ssn)
Hook.get('prospect').validate('custentity_ssn', Validator.org_ssn)
-Hook.get('prospect').validate(Validator.at_least_one_address)
-Hook.get('prospect').validate(Validator.address)
@johanlunds
johanlunds / gen.sh
Last active August 29, 2015 14:15
Generate ctags file for Ruby project
gem install ripper-tags
rbenv rehash
ripper-tags -f .tags -R --exclude=.git --exclude=log . $(bundle list --paths)
# Relative paths may be better when only generating for project:
ripper-tags -f .tags -R --exclude=.git --exclude=log --tag-relative .
#
# OLD using https://github.com/fishman/ctags:
# Bash/terminal customization. See man bash(1)
export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ "
export HISTCONTROL=erasedups
export HISTSIZE=10000
# This ensures that when you exit a shell, the history
# from that session is _appended_ to ~/.bash_history. Without this,
# you might very well lose the history of entire sessions (rather weird
# that this is not enabled by default).
shopt -s histappend
describe "Using a fake server for Ajax", ->
server = null
beforeEach -> server = sinon.fakeServer.create()
afterEach -> server.restore()
context "when Ajax succeeds", ->
beforeEach -> respondWithJSON("/url/123", 200, '{"city": "Palm Springs"}')
it "does stuff", ->
server.respond()
var options, page;
options = {
url: phantom.args[0] || 'http://127.0.0.1:3000/jasmine',
timeout: parseInt(phantom.args[1] || 5000),
specdoc: phantom.args[2] || 'failure',
focus: /true/i.test(phantom.args[3]),
console: phantom.args[4] || 'failure',
errors: phantom.args[5] || 'failure'
};
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="/jasmine.css">
<script type="text/javascript" src="/jasmine.js"></script>
<script type="text/javascript" src="/jasmine-html.js"></script>
<script type="text/javascript">
(function() {
var currentWindowOnload, execJasmine, htmlReporter, jasmineEnv;
execJasmine = function() {
require 'open-uri'
url = 'https://www.google.se/?q=hejsan#output=search&sclient=psy-ab&q=hejsan&oq=hejsan&gs_l=hp.12...0.0.0.3922.0.0.0.0.0.0.0.0..0.0...0.0.0..1c..17.psy-ab.8WBSJa-IWsA&pbx=1&bav=on.2,or.r_qf.&bvm=bv.48572450,d.Yms&fp=6ac8bc13f76b424b&biw=1424&bih=1284'
i = 0
while true
open(url)
i += 1
puts "ddos #{i}"