Skip to content

Instantly share code, notes, and snippets.

View PizzaBrandon's full-sized avatar

Brandon Belvin PizzaBrandon

  • St. Louis, MO
  • 20:19 (UTC -05:00)
View GitHub Profile
@crittermike
crittermike / App.js
Last active May 9, 2022 08:18
Using Google API (gapi) with React
/* global gapi */
const API_KEY = 'YOURAPIKEYHERE';
import React, { Component } from 'react';
class App extends Component {
loadYoutubeApi() {
const script = document.createElement("script");
const cluster = require('cluster');
const childProcess = require('child_process');
const cpus = require('os').cpus().length;
const processes = cpus >= 2 ? cpus : 2;
if(cluster.isMaster){
console.log("Starting server processes");
for(var i = 0; i < processes; i++){
cluster.fork();
@maettig
maettig / LICENSE.txt
Created January 16, 2012 16:56 — forked from 140bytes/LICENSE.txt
dumpGlobalLeaks in 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Thiemo Mättig <http://maettig.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE