Skip to content

Instantly share code, notes, and snippets.

@jethroo
jethroo / gist:54e2bee5d69410d34f10
Last active August 29, 2015 14:07
show git changes and branch name in shell prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "⚡"
}
# show git branch
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1="\[\033[00m\]\u@\h\[\033[01;33m\] \w \[\033[31m\]\$(parse_git_branch)\[\033[00m\]$\[\033[00m\] "

SSL upgrades on rubygems.org and RubyInstaller versions

Hello,

If you reached this page, means you've hit this SSL error when trying to pull updates from RubyGems:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

This error is produced by changes in rubygems.org infrastructure, please

@jethroo
jethroo / gist:ddfa3b1fe5a2203288fb
Created May 12, 2015 08:31
OSX sublime-keymap - User
[
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true} }
]
@jethroo
jethroo / gist:749badfaf07a880536f4
Created February 11, 2016 09:21
Sublime User Settings
{
"color_scheme": "Packages/Solarized Color Scheme/Solarized (light).tmTheme",
"create_window_at_startup": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
@jethroo
jethroo / delete_old_local_branches
Last active February 22, 2016 08:13
deletes all local branches with no changes in 1 week
for k in $(git branch | sed /\*/d | grep '../..'); do
if [ -n "$(git log -1 --since='1 week ago' -s $k)" ]; then
echo keeping $k;
else
git branch -D $k;
fi;
done
say -v Cellos Ar-rr-rr-rr-rr-rr-rr-rr-rr-rr-rr-rr-spec is done
say -v Cellos dong dong dong ding ding ding dong Spec is done Spec is donne
say -v Daniel RSpec is done, Mi Lord
#!/bin/sh
for file in $(find ./app/assets/stylesheets/ -name "*.css.scss")
do
git mv $file `echo $file | sed s/\.css//`
done
@jethroo
jethroo / disable_angular_debug_info
Created May 4, 2016 08:58
Improving Angular performance with 1 line of code
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
https://medium.com/@hackupstate/improving-angular-performance-with-1-line-of-code-a1fb814a6476#.j1tip7ulc
@jethroo
jethroo / autocomplete.html
Created May 24, 2016 14:53 — forked from hernan/autocomplete.html
jquery autocomplete demo with custom render item implementation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete - Custom data and display</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
@jethroo
jethroo / app.js
Created February 15, 2017 15:59 — forked from davidkpiano/app.js
Simple way to namespace React components
import React from 'react';
import * as My from './components/my-components.js';
export default class App extends React.Component {
render() {
return (
<div>
<My.Foo />
<My.Bar />