Skip to content

Instantly share code, notes, and snippets.

🏁
Eth wrangling.

justin j. moses justinjmoses

🏁
Eth wrangling.
Block or report user

Report or block justinjmoses

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
@justinjmoses
justinjmoses / App.js
Last active Oct 6, 2016
Navigator in react-native
View App.js
import Start from './Start'
import NextPage from './NextPage'
const Views = { Start, NextPage }
<Navigator
initialRoute={{ view: 'Start' }}
renderScene={(route, navigator) => {
const SceneComponent = Views[route.view];
return <SceneComponent {...route.props} navigator={navigator} />;
@justinjmoses
justinjmoses / echoline.sh
Created Mar 11, 2016
Echo 5 lines before and after line in a file
View echoline.sh
#Usage echoline LINE_NUMBER FILE
function echoline() { sed -n "$(($1 - 5)),$(($1 + 5))p" $2; }
@justinjmoses
justinjmoses / gist:3987615
Created Oct 31, 2012
git remove local merged branches
View gist:3987615
git branch --merged master | grep -v 'master$' | xargs git branch -d
@justinjmoses
justinjmoses / gist:3987610
Created Oct 31, 2012
delete used remote branches
View gist:3987610
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' | xargs -I% git push origin :%
@justinjmoses
justinjmoses / example.coffee
Created Aug 24, 2012
little coffeescript class quiz
View example.coffee
class Person
info: {}
setName: (name) -> @info.name = name
justin = new Person()
justin.setName "justin"
paul = new Person()
@justinjmoses
justinjmoses / gist:3195313
Created Jul 28, 2012
mimic jquery selectors from unattached html (as text) in webkit
View gist:3195313
doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html')
doc.documentElement.innerHTML = "<div><p class='first'>...</p></div>"
nodeList = doc.querySelectorAll(".first")
View main.coffee
require.config
baseUrl: '/static/coffee/app'
paths:
text: '/static/js/require.text'
underscore: '/static/js/underscore-min'
backbone: '/static/js/backbone-min'
backboneTP: '/static/js/backbone-tastypie'
shim:
underscore:
exports: '_'
View cucumber.feature
Feature: Present clearly
As a presenter
I'd like to ensure my content is clear and concise
So that my audience understand the value of Cucumber
Scenario: Ensure audience can see the presentation
Given I start the presentation off
Then the audience should be able to see the initial slide
And the slide should have the content "green like a cuke!"
View .js
this.browser.clickLink(link, function(e, b, s) {
b.onconfirm(function(q){ return true; });
callback(e,b,s);
});
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>1.0.0-SNAPSHOT</version>
You can’t perform that action at this time.