Skip to content

Instantly share code, notes, and snippets.

View randallb's full-sized avatar
🎬

Randall Bennett randallb

🎬
View GitHub Profile
#!/usr/bin/env bash
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
sudo apt-get install -y git
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 3 column 22
---
layout: post
published: false
title: Don't buy fans: How broadcasters can get the most out of Facebook, without having to pay to promote posts
---
<iframe width="560" height="315" src="//www.youtube.com/embed/oVfHeWTKjag?rel=0" frameborder="0" allowfullscreen></iframe>

You might have seen a video explaining how buying likes from Facebook can actually hurt your ability to reach your audience. It's true: Click farmers spend hours trying to like pages for which they'll never engage. And, savvy social media analysts note the less people engage with your posts, the lower in priority Facebook will rank your posts, and fewer people will see them broadly. Then, if you want anyone to see your posts, you wind up paying Facebook to promote posts to people who've already asked to see your content. Not a fun situation.

@pauliooj on rails:

"It's sort of like this... Imagine you want to travel to Mars. First you ask a C-style programming environment, and get the answer: "Sure you can. You should compute an optimal trajectory. And get enough liquid oxygen to use as fuel, obviously. And build a launching pad... Preferably near the equator. And a few other things." Then you ask a Rails-style environment. The answer is: "Mars? Yeah, that's easy. You should go to Times Square at 1.34 am on a Wednesday and wear a purple hat with black dots. An alien ship will pick you up there and take care of the rest.""

Updating selenium standalone
downloading http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar...
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip...
events.js:68
throw arguments[1]; // Unhandled 'error' event
^
Error: 140648298891072:error:0607907F:digital envelope routines:EVP_PKEY_get1_RSA:expecting an rsa key:../deps/openssl/openssl/crypto/evp/p_lib.c:288:
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index dd45802..0db14d7 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 224 fixup descriptions.
+ * This file contains 225 fixup descriptions.
processCells: (cells) =>
for cell in cells
@[cell.attributes.attribute.id] = {} if !@[cell.attributes.attribute.id]?
@[cell.attributes.attribute.id][cell.attributes.attribute.value] = {} if !@[cell.attributes.attribute.id][cell.attributes.attribute.value]?
if _.isNaN(cell.value / 1) && cell.value
@[cell.attributes.attribute.id][cell.attributes.attribute.value].name = cell.value unless @[cell.attributes.attribute.id][cell.attributes.attribute.value].name?
else if cell.value
@[cell.attributes.attribute.id][cell.attributes.attribute.value].value = cell.value / 1 unless @[cell.attributes.attribute.id][cell.attributes.attribute.value].value?
[{"Race ID":300000,"Race Name":"Republican for State Senate 2","Candidate ID":300001,"Candidate Name":"GEORGE CHAPMAN","Party":null,"County ID":18,"County Name":"Salt Lake","Precincts Reporting":65,"Precincts":65,"Votes":647,"Race Type":"State Senate"},{"Race ID":300000,"Race Name":"Republican for State Senate 2","Candidate ID":300002,"Candidate Name":"JACQUIE NIELSEN","Party":null,"County ID":18,"County Name":"Salt Lake","Precincts Reporting":65,"Precincts":65,"Votes":959,"Race Type":"State Senate"},{"Race ID":300050,"Race Name":"Republican for State Senate 28","Candidate ID":300051,"Candidate Name":"CASEY O. ANDERSON","Party":null,"County ID":1,"County Name":"Beaver","Precincts Reporting":8,"Precincts":8,"Votes":189,"Race Type":"State Senate"},{"Race ID":300050,"Race Name":"Republican for State Senate 28","Candidate ID":300051,"Candidate Name":"CASEY O. ANDERSON","Party":null,"County ID":11,"County Name":"Iron","Precincts Reporting":40,"Precincts":40,"Votes":948,"Race Type":"State Senate"},{"Race ID":300050
[{"Race ID":300000,"Race Name":"Republican for State Senate 2","Candidate ID":300001,"Candidate Name":"GEORGE CHAPMAN","Party":null,"County ID":18,"County Name":"Salt Lake","Precincts Reporting":65,"Precincts":65,"Votes":647,"Race Type":"State Senate"},{"Race ID":300000,"Race Name":"Republican for State Senate 2","Candidate ID":300002,"Candidate Name":"JACQUIE NIELSEN","Party":null,"County ID":18,"County Name":"Salt Lake","Precincts Reporting":65,"Precincts":65,"Votes":959,"Race Type":"State Senate"},{"Race ID":300050,"Race Name":"Republican for State Senate 28","Candidate ID":300051,"Candidate Name":"CASEY O. ANDERSON","Party":null,"County ID":1,"County Name":"Beaver","Precincts Reporting":8,"Precincts":8,"Votes":189,"Race Type":"State Senate"},{"Race ID":300050,"Race Name":"Republican for State Senate 28","Candidate ID":300051,"Candidate Name":"CASEY O. ANDERSON","Party":null,"County ID":11,"County Name":"Iron","Precincts Reporting":40,"Precincts":40,"Votes":948,"Race Type":"State Senate"},{"Race ID":300050

Correlation != causation. The reason for all those things is because the auto industry failed to adapt to technology changes, leaving a huge hole in a place that was used to having a lot of affluent workers. That means the barbershop stops getting customers, so does the grocery store, etc.

I imagine silicon valley could look just like detroit if all of the sudden all the companies just hit "pause" and stopped building new cool things.

The auto industry got its butt handed to itself by Japan's innovative manufacturing techniques.

To blame the democrats exclusively for what are clearly economic woes is not accurate at best, and misinforms others, at worst. If republicans are great, we should celebrate the places where they actually are great, instead of taking pot shots at loosely correlated facts, and viewing the democrats as "the other guys, who clearly are morons." Democrats often do the same to republicans, which is actually just the politician's way of getting what they want: Dehumanizing the other guy

@randallb
randallb / gist:bb52e8a57fc560316c2f
Created July 17, 2015 15:16
Kurento pipeline which only one audio records.
exports.createCompositePipeline = function(hostSdpOffer, guestSdpOffer, callback) {
if (callback == null) {
callback = function() {};
}
console.log("Creating call pipeline");
return client.create('MediaPipeline', function(err, pipeline) {
return pipeline.create('WebRtcEndpoint', function(err, hostWebRtcEndpoint) {
return pipeline.create('WebRtcEndpoint', function(err, guestWebRtcEndpoint) {
return pipeline.create('Composite', function(err, composite) {
return composite.createHubPort(function(err, guestHubPort) {