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 / readdir.js
Created Feb 3, 2020
read dir node script invoke: node readdir PATHTODIR
View readdir.js
const path = require('path');
const fs = require('fs');
//joining path of directory
const directoryPath = path.join(process.argv[2]);
//passsing directoryPath and callback function
fs.readdir(directoryPath, function (err, files) {
//handling error
if (err) {
return console.log('Unable to scan directory: ' + err);
}
View Fira Code.json
{
"Ansi 5 Color" : {
"Green Component" : 0.31030611240647216,
"Red Component" : 0.73992505656108598,
"Blue Component" : 0.35376425577116455
},
"Working Directory" : "\/Users\/steveross",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 0.24950546026229858,
View brew-list-output.txt
➜ 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
View starship-iterm.toml
# place in ~/.config
# Don't print a new line at the start of the prompt
add_newline = false
[character]
disabled = true
[line_break]
disabled = true
@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
You can’t perform that action at this time.