Skip to content

Instantly share code, notes, and snippets.

View dfischer's full-sized avatar

0x44 0x46 dfischer

View GitHub Profile
Ctrl + A - move to start of current paragraph
Ctrl + B - move left one character
Ctrl + D - forwards delete
Ctrl + E - move to end of current paragraph
Ctrl + F - move right one character
Ctrl + H - delete
Ctrl + K - delete remainder of current paragraph
Ctrl + N - move down one line
Ctrl + O - insert new line after cursor
Ctrl + P - move up one line
@dfischer
dfischer / gist:15998d9532cdf2904804
Created May 2, 2014 00:07
Happy hacker keyboard cheat sheet
ctrl + a = beginning of line
ctrl + e = end of line
ctrl + b = one character left in line
ctrl + f = one character forward in line
ctrl + k = kill everything in like (goes into yank)
ctrl + y = output yanked
ctrl + p = previous line
ctrl + n = next line
ctrl + o = split line
control + j = join line
# 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 / WIP
Created September 12, 2014 08:04
Meteor folder structure
client
views
posts
posts_index.html
posts_index.less
lib
collections
private
public
server
@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'

def serve_drinks(%User{age: age}) when age >= 21 do
# Code that serves drinks!
end
serve_drinks User.get("John Doe")
#=> Fails if the user is under 21
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 / gist:2817e8de4dad14a968fe0681990b838c
Created October 1, 2017 13:53
serverless.yml iam template
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudformation:Describe*",
"cloudformation:List*",
"cloudformation:Get*",
"cloudformation:PreviewStackUpdate",