This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#include "fpsitem.h" | |
#include <QElapsedTimer> | |
FPSItem::FPSItem(QQuickItem *parent) | |
: QQuickItem(parent) | |
, m_averageMsPerFrame(0) | |
{ | |
setFlag(ItemHasContents); | |
} |
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User | |
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User | |
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User | |
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["ctrl"], | |
"press_command": "drag_select", |
var restify = require('restify'); | |
// Authentication | |
var passport = require('passport'); | |
var LocalStrategy = require('passport-local').Strategy; | |
var sessions = require("client-sessions"); | |
var server = restify.createServer(); | |
server.use(restify.queryParser()); | |
server.use(restify.bodyParser()); |
Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
import React, {Component} from "react"; | |
import cx from 'classnames'; | |
import vjs from 'video.js'; | |
import _ from 'lodash'; | |
import ReactDOM from 'react-dom'; | |
const DEFAULT_HEIGHT = "100%"; | |
const DEFAULT_WIDTH = "100%"; | |
const DEFAULT_ASPECT_RATIO = (9 / 16); | |
const DEFAULT_ADJUSTED_SIZE = 0; |