Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
//After working on the backend for a while, I started to continue working on my front end, | |
//I revisited my redux “cache” store and I made this improvement that made my life a lot easier. | |
//In my project for example, some collections i need to get the document by id, some by slug, some by username, and etc. | |
//If I need to account for those cases I had to make new action creators/types, for different entities. | |
//This is very frustrating as it makes the code less dry and leads to more boilerplate. | |
//Then what I realized was, I can just pass a “index” option for my insert action creators!(which defaults to “id") | |
//Actions |
// Contains support for: SASS/SCSS, concatenation, and minification for JS and CSS | |
var gulp = require('gulp'); | |
var sass = require('gulp-ruby-sass'); | |
var concat = require('gulp-concat'); | |
var compress = require('gulp-yuicompressor'); | |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
defmodule Blog.Repo.Migrations.CreatePost do | |
use Ecto.Migration | |
def up do | |
create table(:posts, primary_key: false) do | |
add :id, :uuid, primary_key: true | |
add :title, :string | |
add :body, :text |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
// lets complain to server command line if you forgot --settings when running Meteor | |
Meteor.startup(function () { | |
if (Meteor.isServer) { | |
if (Object.keys(Meteor.settings).length === 0) { | |
console.log("You forgot to run Meteor with --settings!"); | |
} | |
} | |
}); |
deploy: | |
steps: | |
- add-to-known_hosts: | |
hostname: $HOSTNAME | |
- add-ssh-key: | |
keyname: KEY | |
- script: | |
name: Push to dokku | |
code: | | |
git remote add dokku dokku@$HOSTNAME:$APP |
var PostsApi = require('webapi/posts'), | |
// assuming the api object from the jsbin snippet | |
Reflux = require('reflux'); | |
var PostActions = createActions(["load", "loadError"]); | |
// load action is invoked either from: | |
// * top most component's componentDidMount | |
// function in your application, or | |
// * window.onLoad | |
// I prefer the first strategy because that'll |
export class EnumSymbol { | |
sym = Symbol.for(name); | |
value: number; | |
description: string; | |
constructor(name: string, {value, description}) { | |
if(!Object.is(value, undefined)) this.value = value; | |
if(description) this.description = description; |