Skip to content

Instantly share code, notes, and snippets.

ReactJS Component Cheatsheet

To create a ReactComponent:

ReactComponent React.createClass(object proto)

Basic JSX example:

var TitleComponent = React.createClass({

// REQUIRED

18:16:14: Running steps for project UE4...
18:16:14: Starting: "/usr/bin/make" MyProject3Editor-Linux-DebugGame
Using clang version '3.5.1' (string), 3 (major), 5 (minor), 1 (patch)
Errors detected while compiling /home/danr/Games/UnrealEngine/Engine/Intermediate/Build/BuildRules/-project=_EditorRecompileModuleRules.dll:
(0,0) : error : Unhandled Exception:
(0,0) : error : System.IO.FileLoadException: I/O Error
(0,0) : error : at IKVM.Reflection.AssemblyName..ctor (System.String assemblyName) [0x00000] in <filename unknown>:0
(0,0) : error : at Mono.CSharp.AssemblyDefinition.CreateAssemblyName () [0x00000] in <filename unknown>:0
(0,0) : error : at Mono.CSharp.AssemblyDefinitionStatic.Create (IKVM.Reflection.Universe domain) [0x00000] in <filename unknown>:0
(0,0) : error : at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

layout: post title: "Driving Multiple Monitors on an Optimus Laptop" modified: categories: articles excerpt: tags: [linux, optimus, prime, xrandr, vgaswitcheroo] image: feature: date: 2014-11-03T21:38:00-00:00

# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
@dan-dr
dan-dr / gist:34938a2ad1461482fb92
Created August 20, 2015 18:43
How to delete too long paths in windows (i'm looking at you node_modules)
mkdir empty_dir
robocopy empty_dir the_dir_to_delete /s /mir
rmdir empty_dir
rmdir the_dir_to_delete
@dan-dr
dan-dr / gist:9662de149ddff4fd0957
Created August 28, 2015 14:37
Back up Rdio's Play Later queue to current active playlist if you have Rdio Enhancer
jQuery.each(R.player.queue._collection.models, function(index, track) {
R.enhancer.current_playlist.model.add(track.get('source'));
});
R.logger.log = R.logger._log = R.logger.error = R.logger.warn = R.logger.verbosity = function() {}
@dan-dr
dan-dr / overpass.geojson
Created October 21, 2015 16:43 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dan-dr
dan-dr / PointInPolygon.java
Last active October 22, 2015 15:05
check if point is within polygon
class Boundary {
private final Point[] points; // Points making up the boundary
...
/**
* Return true if the given point is contained inside the boundary.
* See: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
* @param test The point to check
* @return true if the point is inside the boundary, false otherwise
@dan-dr
dan-dr / bookmarklet
Last active April 26, 2018 12:12
Find m3u8 streams for streamlink bookmarklet
javascript:(function (d) {
function guid() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
}