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
View .eslintrc.json
{
"env": {
"browser": true,
"meteor": true,
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
@steve-ross
steve-ross / hub-browse-issue.fish
Last active Mar 9, 2017
Fish plugin to open the issue number for your git branch on github (if your branch is named) my-feature-branch#123 where #123 is your ticket number
View hub-browse-issue.fish
function _git_branch_issue_number
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's/.*#//')
end
function hub-browse-issue
set -l issue_number (_git_branch_issue_number)
hub browse -- issues/$issue_number
end
@steve-ross
steve-ross / n98-magerun.phar.fish
Last active May 17, 2016
n98-magerun completions for fish
View n98-magerun.phar.fish
# Installation:
# This assumes that "n98-magerun.phar" is in your path!
# Copy to ~/.config/fish/completions/n98-magerun.phar.fish
# open new or restart existing shell session
for cmd in (n98-magerun.phar --raw --no-ansi list | sed "s/[[:space:]].*//g");
complete -f -c n98-magerun.phar -a $cmd;
end
@steve-ross
steve-ross / gist:3899678ad3491f3d570f7a4475bfbd39
Created Apr 22, 2016
Meteor Rebuild time on 2011 MacBook Pro 16GB RAM
View gist:3899678ad3491f3d570f7a4475bfbd39
=> Started your app.
=> App running at: http://localhost:3000
| (#3) Profiling: ProjectContext prepareProjectForBuild
|
| ProjectContext prepareProjectForBuild...........................527 ms (1)
| ├─ _initializeCatalog............................................46 ms (1)
| │ ├─ files.readFile 6 ms (16)
| │ ├─ files.exists 4 ms (9)
| │ ├─ runJavaScript package.js 3 ms (9)
View config.fish
# Aliases
alias m "meteor"
alias a "atom"
alias a. "atom ."
alias gst "git status"
alias gco "git checkout"
alias j "jump"
alias ef "atom ~/.config/fish/config.fish"
alias reload "source ~/.config/fish/config.fish"
alias ksd "sudo launchctl kickstart system/homebrew.mxcl.dnsmasq"
@steve-ross
steve-ross / n98-magerun.phar.fish
Created Apr 18, 2016
n98 magerun completions for fish
View n98-magerun.phar.fish
# Installation:
# This assumes that "n98-magerun.phar" is in your path!
# Copy to ~/.config/fish/completions/n98-magerun.phar.fish
# open new or restart existing shell session
for cmd in (n98-magerun.phar --raw --no-ansi list | sed "s/[[:space:]].*//g");
complete -f -c n98-magerun.phar -a $cmd;
end
@steve-ross
steve-ross / git-issue.fish
Created Feb 25, 2016
if you name your github branches ending in #123 this will open the issue on github (using hub)
View git-issue.fish
function _git_branch_issue_number
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's/.*#//')
end
function git-issue
set -l issue_number (_git_branch_issue_number)
git browse -- issues/$issue_number
end
View select.js
Template.afSelect_semanticUI.onRendered(function() {
let node = this.$(this.firstNode);
node.dropdown(_.extend({
fullTextSearch : this.data.atts.fullTextSearch || false,
allowAdditions : this.data.atts.allowAdditions || false,
maxSelections : this.data.atts.maxSelections || false,
allowCategorySelection: this.data.atts.allowCategorySelection || false,
useLabels : this.data.atts.useLabels === false ? false : true
}, this.data.atts.settings));
View sftp-ubuntu.md

Adding SFTP-only user to Ubuntu Server

To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.

Directions

  1. Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:

     Match group filetransfer
     	ChrootDirectory %h
    
@steve-ross
steve-ross / turpentine_esi.xml
Created Oct 6, 2014
turpentine_esi for Magento 1.9 Demo Store
View turpentine_esi.xml
<?xml version="1.0"?>
<!--
Nexcess.net Turpentine Extension for Magento
Copyright (C) 2012 Nexcess.net L.L.C.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
You can’t perform that action at this time.