(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
//pass in number of winners | |
//todo UNIQUE winners and prize mapping | |
var pickWinners = function(numberOfWinners){ | |
var meetup = $(".member-name"); | |
var winners = []; | |
var picked_numbers = {}; | |
while (numberOfWinners){ | |
var winner = Math.floor(Math.random() * meetup.length); | |
////bug in duplciates ins winners array |
This just got linked to by the Y combinator news account, without proper context, | |
so a brief introduction: A month ago (end of May / early June 2014) I had a | |
Twitter conversation with a bunch of acquaintances. One tweet in the middle | |
of that thread, with obligatory hyperbole, was me saying that I think VR is | |
bad news. | |
Well, that part of the thread (but not the rest that provides context) recently | |
got retweeted, and then someone asked me if I could explain what I mean by that, | |
and because Twitter is a great platform for delivering 140 character slogans and | |
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer: |
This shows how to send messages to a connected Tessel over USB and how to log messages that the Tessel writes to console.log().
You'll need to do a tessel push tessel-code.js
to push the script to the Tessel first as it seems you can only have one connection at a time (unless there's another way I'm not aware of).
Then run node host-code.js
to send the message to Tessel. You should see Tessel log back the message it received.
# see the current limits | |
$ sysctl -a | grep maxproc | |
# increase it | |
$ sudo sysctl -w kern.maxproc=xxxx | |
$ sudo sysctl -w kern.maxprocperuid=xxx | |
# run at startup | |
$ sudo vim /etc/sysctl.conf |
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
#!/bin/sh | |
# install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# homebrew-cask | |
brew tap phinze/homebrew-cask | |
brew install brew-cask | |
# development |
// You can have multiple optional arguments, but only if the arguments | |
// can be distinguished from one another (in this example, by type) | |
function optionalUnambiguous(myString, myNumber) { | |
if (typeof myString === 'number') { | |
myNumber = myString; | |
myString = null; | |
} | |
if (myString == null) { myString = 'default'; } | |
if (myNumber == null) { myNumber = 0; } |
# 1) Write a function which takes a phrase. | |
# 2) Phrase is "May the force be with you" | |
# 3) Which of these words has the most synonyms | |
require 'json' | |
require 'net/http' | |
API_KEY = 'SECRET' | |
BASE_URL = "http://thesaurus.altervista.org/service.php?language=en_US&output=json&key=#{API_KEY}&word="; |