Skip to content

Instantly share code, notes, and snippets.

View sergical's full-sized avatar

Sergiy Dybskiy sergical

View GitHub Profile
function isPasswordValid(input) {
if (!hasUppercase(input)) {
console.log('Password needs a capital letter');
}
if (!hasLowercase(input)) {
console.log('Password needs a lowercase letter');
}
if (!isLongEnough(input)) {
console.log('Password needs to be longer');
}
.NewDesign {
background-color: #f6f6f7;
}
.NewDesign button.Polaris-Button--primary {
background: #008060;
border-color: #008060;
}
.NewDesign button[role="gridcell"][aria-selected="true"] {
@sergical
sergical / eb-fix.js
Last active July 6, 2017 19:19
Elastic Beanstalk fix to set client side Meteor settings
if (Meteor.isProduction) {
// public settings that need to be exposed to the client can be added here
const publicEnvs = {
// Your client settings go here
};
Meteor.settings.public = publicEnvs;
__meteor_runtime_config__.PUBLIC_SETTINGS = Meteor.settings.public;
}
@sergical
sergical / methods.js
Created February 11, 2015 23:35
This is my method in Meteor when a user tries to pay the invoice. I want to be able to set up a custom email receipt but I don't know where to start.
Meteor.methods({
payInvoice: function (token, transfer) {
// TODO: add checks
console.log('=== Pay Invoive ===');
console.log(token);
console.log(JSON.stringify(transfer, null, 2));
console.log('===================');
var Stripe = StripeAPI(transfer.invoice.stripe.accessToken);
@sergical
sergical / accouts.js
Created February 5, 2015 17:42
onboarding
Accounts.onCreateUser(function(options, user) {
//misc stuff
if(options.profile.invite){
Invites.remove({_id: options.profile.invite});
}
//this is what i need to be doing?
user.isNew = true;
filepicker.pickAndStore(
{
multiple: false,
maxFiles: 1,
services: ['COMPUTER', 'GOOGLE_DRIVE', 'DROPBOX']
},{
access:"private"
},
function(InkBlobs){
var fileTotal = 0;