Skip to content

Instantly share code, notes, and snippets.

@steve-ross
steve-ross / javascript.json
Created February 22, 2017 21:03
meteor snippets for vscode
{
"Meteor onCreated Method": {
"prefix": "mon",
"body": [
"Template.${1:name}.onCreated(function ${1:name}OnCreated() {",
"\tconst instance = this;",
"\t$0",
"\tinstance.autorun(() => {",
"\t});",
{
"blocks": [
{
"type": "hero",
"name": "Hero Banner",
"settings": [
{
"id": "bannerImage",
"type": "image_picker",
"label": "Banner Image"
@steve-ross
steve-ross / .direnvrc
Last active November 14, 2017 19:28
Some Useful direnv.net helpers
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
@steve-ross
steve-ross / methods.js
Created December 6, 2017 20:10
Validated alert method for meteor
// 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 / 26_remove_profile_email.js
Created December 20, 2017 14:14
migration with temporary simple schema
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
}
{
"blocks": [{
"name": "Collection callout",
"class": "index-section",
"settings": [{
"type": "collection",
"id": "collection",
"label": "Collection"
},
{
@steve-ross
steve-ross / users.js
Created December 21, 2017 19:12
Simple Schema Example for a user
import { Validator } from '../../imports/schemas/validators';
Schemas.UserProfile = new SimpleSchema({
name : {
type : String,
autoform: {
label: 'Full Name'
},
custom: Validator.twoOrMoreWords
},
@steve-ross
steve-ross / .eslintrc
Created January 17, 2018 20:14
eslint meteor react
{
"env": {
"es6": true,
"node": true,
"jquery": true
},
"parser": "babel-eslint",
"extends": [
@steve-ross
steve-ross / starship-iterm.toml
Last active September 7, 2021 16:47
Starship Config
# place in ~/.config/starship-iterm.toml
# Don't print a new line at the start of the prompt
add_newline = false
[directory]
style = ""
disabled = true
[character]
disabled = true
@steve-ross
steve-ross / brew-list-output.txt
Created November 21, 2019 18:51
homebrew packages
➜ brew list
adns fribidi hub libomp oniguruma rename
augeas fzf ical-buddy libplist openexr ruby-build
autoconf gdbm icu4c libpng openjpeg shared-mime-info
autojump gettext ideviceinstaller libspiro openssl sphinx-doc
automake giflib ilmbase libtasn1 openssl@1.1 sqlite
awscli git imagemagick libtiff p11-kit terminal-notifier
bfg git-flow ios-deploy libtool p7zip thefuck
cairo git-lfs jpeg libuninameslist pango themekit
certbot glib jq libunistring pcre unbound