Skip to content

Instantly share code, notes, and snippets.

View dfischer's full-sized avatar

0x44 0x46 dfischer

View GitHub Profile
@dfischer
dfischer / .DS_Store
Created February 29, 2012 03:43 — forked from deadprogram/Gemfile
Ruby Sample Application for AT&T Alpha API Foundry
# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis)
# Check our Studio: https://gentlenode.com/
# Iron Router > Configuration
Router.configure
layoutTemplate: 'Main'
loadingTemplate: 'Loading'
--- /dev/null
+++ b/client/views/application/disqus.html
@@ -0,0 +1,7 @@
+<template name="disqus">
+ <div id="my-disqus">
+ <div id="disqus_thread"></div>
+ <noscript>Por favor, habilite JavaScript para ver os <a href="http://disqus.com/?ref_noscript">comentários hospeda
+ <a href="http://disqus.com" class="dsq-brlink"><h2>Carregando postagens...</h2><br /><small>comentários hospedados
+ </div>
+</template>
@dfischer
dfischer / on-jsx.markdown
Created January 24, 2016 01:00 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'

import ApolloClient, { createNetworkInterface } from 'apollo-client';
const networkInterface = createNetworkInterface('/graphql');
networkInterface.use({
applyMiddleWare(req, next) => {
if (!req.options.header) {
req.options.header = {}; // Create the header object if needed.
}
req.options.header.authorization = localStorage.getItem('token') ? localStorage.getItem('token') : null;
@dfischer
dfischer / .travis.yml
Created October 4, 2016 21:55 — forked from BretFisher/.travis.yml
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@dfischer
dfischer / Powerline.md
Created April 26, 2018 02:49 — forked from mrkara/Powerline.md
Install Powerline on Debian 9 Stretch
  1. Install pip sudo apt-get install python-pip
  2. Install powerline sudo pip install powerline-status
  3. Install fonts sudo apt-get install fonts-powerline
  4. Add these lines to respective files:

.vimrc > set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/

// Separate url validation logic from Replies.sayInvalidLinkedInUrl side effect.
// This way you can reuse this function in other methods
const getUrlFromEvent = (event) => Maybe.of(event)
.filter(x => event.message.nlp.entities.url)
.filter(x => event.message.nlp.entities.url[0].domain !== 'linkedin.com')
.chain(x => Maybe.fromNullable(extract(event.message.nlp.entities.url)))
consume.onUserState('preferences/linkedin/url', ({ event, userId }) => getUrlFromEvent(event)
.caseOf({
Just: (url) => Promise.all([User.updatePreferences(userId, {linkedIn: url[0]}), Dispatch.linkedInUrlReceived({ userId })]),
@dfischer
dfischer / renamefiles.fish
Created October 15, 2019 03:15 — forked from staydecent/renamefiles.fish
File renaming pattern for Fish Shell with OSX sed
# 'Item*' it the pattern to look for
# sed "s/I/i/g" is the replacement pattern
for f in Item*; mv $f (echo {$f} | sed "s/I/i/g"); end