Skip to content

Instantly share code, notes, and snippets.

Steve Ross steve-ross

Block or report user

Report or block steve-ross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@steve-ross
steve-ross / .eslintrc
Created Jan 17, 2018
eslint meteor react
View .eslintrc
{
"env": {
"es6": true,
"node": true,
"jquery": true
},
"parser": "babel-eslint",
"extends": [
@steve-ross
steve-ross / users.js
Created Dec 21, 2017
Simple Schema Example for a user
View users.js
import { Validator } from '../../imports/schemas/validators';
Schemas.UserProfile = new SimpleSchema({
name : {
type : String,
autoform: {
label: 'Full Name'
},
custom: Validator.twoOrMoreWords
},
View gist:a8edf77b0c9bcdfac6cf648de4bb3b4f
{
"blocks": [{
"name": "Collection callout",
"class": "index-section",
"settings": [{
"type": "collection",
"id": "collection",
"label": "Collection"
},
{
@steve-ross
steve-ross / 26_remove_profile_email.js
Created Dec 20, 2017
migration with temporary simple schema
View 26_remove_profile_email.js
Migrations.add({
version : 26,
name : 'Remove profile.email from users',
up : function(){
// add optional profile.email so we can remove it
var profile = _.extend({
email : {
type : String,
optional: true
}
@steve-ross
steve-ross / methods.js
Created Dec 6, 2017
Validated alert method for meteor
View methods.js
// location: imports/api/util/server/methods.js
import { Meteor } from 'meteor/meteor';
import { ValidatedMethod } from 'meteor/mdg:validated-method';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
const env = process.env.NODE_ENV;
const environmentInfo = env === 'development' ? `[${process.env.HOME}]` : `${Meteor.settings['galaxy.meteor.com'].env.ROOT_URL}`;
const alert = new ValidatedMethod({
@steve-ross
steve-ross / .direnvrc
Last active Nov 14, 2017
Some Useful direnv.net helpers
View .direnvrc
install_nvm(){
log_status "Installing NVM"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
nvm install
}
npm_install(){
local HAS_NODE_MODULES_BIN=$(find node_modules/.bin)
if [ -z "$HAS_NODE_MODULES_BIN" ]; then
View gist:057a8dac511d5239aaf0e338cf00882b
{
"blocks": [
{
"type": "hero",
"name": "Hero Banner",
"settings": [
{
"id": "bannerImage",
"type": "image_picker",
"label": "Banner Image"
@steve-ross
steve-ross / javascript.json
Created Feb 22, 2017
meteor snippets for vscode
View javascript.json
{
"Meteor onCreated Method": {
"prefix": "mon",
"body": [
"Template.${1:name}.onCreated(function ${1:name}OnCreated() {",
"\tconst instance = this;",
"\t$0",
"\tinstance.autorun(() => {",
"\t});",
@steve-ross
steve-ross / hideFiles.fish
Created Aug 3, 2016
fish function hide hidden files fish function
View hideFiles.fish
function hideFiles
defaults write com.apple.finder AppleShowAllFiles NO
killall Finder /System/Library/CoreServices/Finder.app $argv
end
@steve-ross
steve-ross / showFiles.fish
Created Aug 3, 2016
Mac finder showhidden files fish function
View showFiles.fish
function showFiles
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder /System/Library/CoreServices/Finder.app $argv
end
You can’t perform that action at this time.