Skip to content

Instantly share code, notes, and snippets.

View stavarotti's full-sized avatar

Steve Chikwaya stavarotti

  • Papillion, NE
View GitHub Profile
@stavarotti
stavarotti / richhickey.md
Created April 20, 2018 04:11 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

import Ember from 'ember';
export default Ember.Component.extend({
model: [],
hasData: Ember.computed('model', {
get() {
let model = this.get('model');
return !Ember.isEmpty(model) &&
!(Ember.get(model, 'message') === 'no_data');

vim-thug-mode

So you want your vim to be straight up aquafina polar bear status? That maraschino cherry gold plated butterscotch library book shit?

Well iight den. Do this.

  1. Holla at your .vimrc/.nvimrc file, and put these plugins in:
Plugin 'pangloss/vim-javascript'
# Returns true if the vm is running, else false
Function isVmRunning([string]$name) {
# Whether the named vm is running
[bool]$isRunning = $false
# Use `vmrun` to get the list of currently running vms
[string[]]$runningVms = Invoke-Expression "vmrun list"
# Get the number of running VMs
[int16]$numOfRunningVms = $runningVms.Get(0).split(":").Get(1).Trim()
:: When calling a PowerShell script, we need to bypass the the default policy which restricts (a good thing) script from running.
PowerShell -Command "if((Get-ExecutionPolicy) -ne 'Unrestricted') { Set-ExecutionPolicy Bypass -Scope Process }" "C:\vm\vmware\win7-startup.ps1"
{
"always_show_minimap_viewport": true,
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"copy_with_empty_selection": false,
@stavarotti
stavarotti / git_remove_merged_branches.sh
Created January 12, 2016 23:02
Deleted merged branches
git branch --merged | grep -vE "develop|master" | xargs -n 1 git branch -d
@stavarotti
stavarotti / gist:d2571f44cc897eeed4f4
Created December 19, 2015 21:34
Fix permissions
sudo chown -R `whoami` /usr/local/bin
@stavarotti
stavarotti / emberGenerateDynamicRoute.js
Last active October 8, 2015 15:28
generate a dynamic url in Ember
_generateUrl(routeName, dynamicSegments, queryParams) {
const router = this.get('router');
const args = [ routeName ].concat(dynamicSegments);
if (queryParams) {
args.push({ queryParams });
}
const url = router.generate(...args);
@stavarotti
stavarotti / ember_view_lookup.js
Created October 8, 2015 05:53
Lookup a view instance in Ember
// < 1.13
Ember.View.views(Ember.guidFor(this))
// 1.13 +
this.container.lookup('-view-registry:main')[Ember.guidFor(this)]