Skip to content

Instantly share code, notes, and snippets.

View andevsoftware's full-sized avatar

Andev Software andevsoftware

View GitHub Profile
@andevsoftware
andevsoftware / gist:390c64deeb1e597136e63f4bbb9ba3f5
Created November 29, 2016 10:56
MacOS Finder: Full file path
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder
[
[
[
1388538000000,
10.7,
14.3
],
[
1388624400000,
11.4,
@andevsoftware
andevsoftware / apiserializer.test.json
Last active March 12, 2016 12:35
ApiSerializer Test Json
{
"leads":{
"id":38,
"amountHours":0,
"contactId":428,
"childName":"Test",
"childLastname":"Bad",
"notes":"do as lorem",
"phaseStatus":4,
"childcareType":2,
@andevsoftware
andevsoftware / typescript.initialize.ts
Created March 11, 2016 08:06
TypeScript initialize example
class A {
public get static() {
return Object.getPrototypeOf(this).constructor;
}
constructor() {
console.log('constructor A');
this.initialize();
}
@andevsoftware
andevsoftware / typescript.constructed.ts
Last active March 11, 2016 07:55
TypeScript Constructed example
class A {
public get static() {
return Object.getPrototypeOf(this).constructor;
}
constructor() {
console.log('constructor A');
this.constructed(A);
}
---
name: TSForm.Elements.InputElement - Basic Example
authors:
- Olivier Andriessen
resources:
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
- https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js
- https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js
- https://code.angularjs.org/1.4.9/angular.js
@andevsoftware
andevsoftware / ts-validate.validators.url.ts
Last active March 5, 2016 13:01
TSValidate.Validators.Url
import Url = TSValidate.Validators.Url;
validator.add('url', new Url()
.message(':field must be a url')
);
@andevsoftware
andevsoftware / ts-validate.validators.confirmation.ts
Last active March 6, 2016 11:07
TSValidate.Validators.Confirmation
import Confirmation = TSValidate.Validator.Confirmation;
validator.add('password', new Confirmation()
.against('confirmPassword')
.message('Password doesn\'t match confirmation')
);
@andevsoftware
andevsoftware / ts-validate.validators.between.ts
Last active March 6, 2016 10:42
TSValidate.Validators.Between
import Between = TSValidate.Validators.Between;
validator.add('price', new Between()
.minimum(0)
.maximum(100)
.message('The price must be between 0 and 100')
);
@andevsoftware
andevsoftware / ts-validate.validators.stringlength.ts
Created March 5, 2016 12:41
TSValidate.Validators.StringLength
import StringLength = TSValidate.Validators.StringLength;
validation.add('name_last', new StringLength()
.max(50)
.min(2)
.messageMaximum('We don\'t like really long names')
.messageMinimum('We want more than just their initials')
);