As configured in my dotfiles.
start new:
tmux
start new with session name:
var http = require('http'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var AUDIOFILE = "./audio.ogg"; | |
function serveWithRanges(request, response, content) { | |
var range = request.headers.range; | |
var total = content.length; | |
var parts = range.replace(/bytes=/, "").split("-"); |
As configured in my dotfiles.
start new:
tmux
start new with session name:
<!-- Respect Rollcall --> | |
<li><a href="http://www.alistapart.com/articles/">A List Apart — for website builders</a></li> | |
<li><a href="http://abstrusegoose.com/">Abstruse Goose — my favorite comic</a></li> | |
<li><a href="http://al3x.net/">Alex Payne — technology rambling</a></li> | |
<li><a href="http://dashes.com/anil/">Anil Dash — on culture, apple & design</a></li> | |
<li><a href="http://weblogs.mozillazine.org/asa/">Asa Dotzler — on mozilla & software</a></li> | |
<li><a href="http://www.azarask.in/blog/">Aza Raskin – on design & firefox</a></li> | |
<li><a href="http://christophzillgens.com/en/">Christoph Zillgens — interface design</a></li> | |
<li><a href="http://cssremix.com/">CSS Remix — gorgeous designs</a></li> | |
<li><a href="http://css-tricks.com/">CSS Tricks</a></li> |
require 'date' | |
class FirebasePush | |
PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz' | |
def initialize | |
@prev_ts = 0 | |
@rand_chars = Array.new(12) | |
end |
##Twitter gem overview
The Twitter Ruby gem is a Ruby interface to the Twitter API. It allows you to make all available Twitter API requests (e.g., tweet, follow a user, search, etc.) within a Rails app.
This guide was adapted from multiple sources, including the Twitter Ruby gem configuration page and How to Make a Twitter Bot in Ruby on Rails. Twitter's own API docs are a good resource too, of course.
####Get set up with Twitter To begin, you'll need to register your application with Twitter and get the proper keys. Log into or sign up for a Twitter account, and scroll down to "Manage Your Apps." Click "Create a New App" and fill out the form with the app's details. Once you're on the app's management page, select the "Permissions" tab. Make sure access is set to "Read a
function makepayment(key, email, amount, ref, callback) { | |
var handler = PaystackPop.setup({ | |
key: key, // This is your public key only! | |
email: email || 'customer@email.com', // Customers email | |
amount: amount || 5000000.00, // The amount charged, I like big money lol | |
ref: ref || 6019, // Generate a random reference number and put here", | |
metadata: { // More custom information about the transaction | |
custom_fields: [ | |
{} | |
] |
<script src='https://js.paystack.co/v1/inline.js'></script> |
# HELP mothership_collector_working Is the master process collector able to collect metrics | |
# TYPE mothership_collector_working gauge | |
mothership_collector_working 1 | |
# HELP mothership_collector_rss total memory used by collector process | |
# TYPE mothership_collector_rss gauge | |
mothership_collector_rss 243605504 | |
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
let
and const
statements. For the purposes of the React documentation, you can consider them equivalent to var
.class
keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this
in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Javruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |