Skip to content

Instantly share code, notes, and snippets.

View longseespace's full-sized avatar
🎯
Focusing

Daniel Nguyen longseespace

🎯
Focusing
View GitHub Profile
@jasonrudolph
jasonrudolph / about.md
Last active January 6, 2024 07:40
Programming Achievements: How to Level Up as a Developer
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
#include "fpsitem.h"
#include <QElapsedTimer>
FPSItem::FPSItem(QQuickItem *parent)
: QQuickItem(parent)
, m_averageMsPerFrame(0)
{
setFlag(ItemHasContents);
}
@kendellfab
kendellfab / goto-sublime
Created August 1, 2013 20:53
Add mouse click `goto definition` in sublime text 3.
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",
@yoitsro
yoitsro / gist:8693021
Last active July 22, 2020 14:52
Node + Restify + Passport + Sessions + WebSockets
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());

THIS DOCUMENT

IS OUT OF

DATE

C++ Coding Standards Part 0: Automated Code Analysis

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.

@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 16, 2024 12:16
Golang landmines

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.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@jfmengels
jfmengels / lodash-fp-documentation.md
Last active February 6, 2024 20:57
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@qknow-w
qknow-w / react-videojs-es6.js
Created August 28, 2016 12:55
react-videojs-es6
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;