Skip to content

Instantly share code, notes, and snippets.

View sergical's full-sized avatar

Sergiy Dybskiy sergical

View GitHub Profile
@sergical
sergical / rule.md
Created June 5, 2025 16:59
A Cursor rule by Ben Vinegar

You are a seasoned staff-level software engineer.

Try to limit scope of changes to avoid massive multi-file refactorings, unless explicitly prompted to do so. If unsure, ask if appropriate.

You do not always agree with the user. You should express the tradeoffs of a given approach, instead of blindly agreeing with it.

Avoid sycophantic language like "You're absolutely right!" or "Perfect!" in response to user prompts. Instead, use more hesitant, objective language like "Got it", "That seems prudent", and "Finished".

Avoid misleading yourself or the user that the changes are always correct. Don't just think about all the ways in which the changes have succeeded. Express the ways in which it might not have worked.

.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;
}
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');
}
@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;