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
# standard ls colors | |
alias ls="ls -G" | |
# grep highlights your search matches | |
alias grep="grep --color=auto" | |
# makes the prompt show exit code, sends an alert (beep), shows the time the prmopt was shown, and the current path. $ is on the next line. | |
# also colored pink to make easier to spot | |
export EXIT_STATUS_VAR='$?' | |
export PS1="\[\e[35m\]\a$(echo $EXIT_STATUS_VAR):\j*\@ \u@\h \w\n\$ \[\e[0m\]" | |
export PS2="" |
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
makeGuid = () -> | |
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) -> | |
r = Math.random() * 16 | 0 | |
if c == 'x' | |
v = r | |
else | |
v = r = (r&0x3|0x8) | |
return v.toString(16) | |
) |
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
Maybe<Email, Exception> UpdateEmail(Maybe<Email, Exception> m) { | |
m = ValidateEmail(m); | |
m = UpdateUserEmail(m); | |
m = SendVerificationEmail(m); | |
return m; | |
} |
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
const move = (obj) => { | |
if(obj.moving) { | |
const newLocation = new Vector3( | |
obj.transform.x + obj.speed.x | |
, obj.transform.y + obj.speed.y | |
, obj.transform.z + obj.speed.z | |
); | |
var newTransform = new Transform(obj.transform, {location: newLocation}) * Time.delta}); | |
return new SceneObj(obj, {transform: newTransform}); | |
} |
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
int foo = 0; | |
int bar = foo++; | |
print(foo); // <= ? | |
print(bar); // <= ? | |
// 5,000,000 ints of 10 | |
std::vector<int> stuff(5000000, 10); | |
// do you know what's in the var 'it'? Is it safe to copy lots and lots? | |
for (std::vector<int>::iterator it = stuff.begin(); it != stuff.end(); it++) { |
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 getMdmCodes = function() { | |
var requests = [ | |
service.getProductGroupCodes | |
, service.getProductTypeCodes | |
, service.getStatusCodes | |
, service.getCountryCodes | |
, _.partial(service.getParties, 'shipper') | |
, _.partial(service.getParties, 'consignee') | |
, _.partial(service.getTariffPointsForUser, {tariffPointType: 'origin'}) | |
, _.partial(service.getTariffPointsForUser, {tariffPointType: 'destination'}) |
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
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var browserSync = require('browser-sync').create(); | |
var reload = browserSync.reload; | |
var DIST = 'dist'; |
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
it("check for untranslated strings", function() { | |
// WIP for the new version | |
const textRegexp = /.+/; | |
const templateBindingRegexp = /^({{.+}})$/; | |
const results = _.map(tmplArray, $tc.get) // load the template from the path | |
.map(angular.element) // process the template data into Angular's DOM | |
.map((e) => e.text()) // remove all markup - only text should remain | |
.map((t) => t.trim()) // remove whitespace | |
// strip out bindings - they are dynamic and thus translated. Probably. | |
.map((t) => t.replace(templateBindingRegexp, '')) |
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
class CallView < ApplicationView | |
set_java_class 'call.CallFrame' | |
CONTRACT_TYPE_TRANSLATION = {nil => nil, '' => '', 'Current' => 'Current', 'current' => 'Current'} | |
#customer fields | |
map :view => "customer_name_combo_box.selected_item", :model => :customer_name, :ignoring => :action | |
map :view => "customer_name_combo_box.model", :transfer => :customer_names, :using => [:to_combo_box_model, nil] | |
map :view => "contact_name_text_field.text", :model => :contact_name | |
map :view => "address_text_field.text", :model => :street_address |
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
NativeException: java.lang.reflect.InvocationTargetException: null | |
java/awt/EventQueue.java:853:in `invokeAndWait' | |
javax/swing/SwingUtilities.java:1257:in `invokeAndWait' | |
sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0' | |
sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke' | |
sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke' | |
java/lang/reflect/Method.java:585:in `invoke' | |
org/jruby/javasupport/JavaMethod.java:298:in `invokeWithExceptionHandling' | |
org/jruby/javasupport/JavaMethod.java:278:in `invoke_static' | |
org/jruby/java/invokers/StaticMethodInvoker.java:47:in `call' |
OlderNewer