Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable no-var */
var merge = require('webpack-merge');
var baseConfig = require('./webpack.config.base');
var prodConfig = {
module: {
loaders: [
{ test: /\.svg$/, loaders: ['url-loader?limit=100000', 'image-webpack'] }
]
}
/* eslint-disable no-var */
var merge = require('webpack-merge');
var baseConfig = require('./webpack.config.base');
var Dashboard = require('webpack-dashboard');
var DashboardPlugin = require('webpack-dashboard/plugin');
var dashboard = new Dashboard();
var devConfig = {
plugins: [
/* eslint-disable no-var */
var webpack = require('webpack');
var cssnano = require('cssnano');
var path = require('path');
var config = {
entry: {
app: './src/index'
},
output: {
import React from 'react';
import { shallow, mount } from 'enzyme';
import Checkbox from 'components/Form/Checkbox';
import expect from 'expect';
import 'jsdom-global/register';
describe('<Checkbox />', () => {
it('adds checked attribute to input', () => {
const wrapper = shallow(<Checkbox checked />);
const input = wrapper.find('input');

Resources

The Meteor Guide

The Meteor Guide is an official guide meant to give Meteor users a more broad view on what the best practices and conventions in the community are. As Meteor is a non-opinionated framework in terms of architecture, this is a valuable resource every Meteor developer must read.

Meteor forums

https://forums.meteor.com/

Blogs

// Post.js
export default class Post {
constructor(data) {
this.id = data.id
this.title = data.title
this.body = data.body
}
}
// PostCtrl.js
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use app.html
RewriteRule ^ /app.html
local find_access_tag = require("lib/access").find_access_tag
local limit = require("lib/maxspeed").limit
lua_sql = require "luasql.postgres" -- we will connect to a postgresql database
sql_env = assert( lua_sql.postgres() )
sql_con = assert( sql_env:connect("forge:forge") ) -- you can add db user/password here if needed
print("PostGIS connection opened")
-- Begin of globals
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["block"] = true }
// Go to https://twitter.com/messages and when the DM's modal is loaded,
// open the console and run this CSS overwrite rules :)
$('.DMInbox')[0].style.maxWidth = '100%'
$('.DMInbox')[0].style.width = '100%'
$('.DMInbox')[0].style.height = '100%'
$('.DMConversation')[0].style.maxWidth = '100%'
$('.DMConversation')[0].style.width = '100%'
$('.DMConversation')[0].style.height = '100%'
$('.DMDock')[0].style.height = '100%'

To disable the auto save functionality in Sketch, open your terminal and put this

defaults write com.bohemiancoding.sketch3 ApplePersistence -bool no

Restart Sketch. Be happier.