Skip to content

Instantly share code, notes, and snippets.

View steve-ross's full-sized avatar
👋

Steve Ross steve-ross

👋
  • Georgia Southern University
  • Savannah, GA
  • 00:13 (UTC -04:00)
View GitHub Profile
@steve-ross
steve-ross / readdir.js
Created February 3, 2020 16:53
read dir node script invoke: node readdir PATHTODIR
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);
}
@steve-ross
steve-ross / Fira Code.json
Created November 21, 2019 18:54
iterm profile
{
"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,
@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 [email protected] 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
@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 / .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 / 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
},
{
"blocks": [{
"name": "Collection callout",
"class": "index-section",
"settings": [{
"type": "collection",
"id": "collection",
"label": "Collection"
},
{
@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
}
@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 / .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