For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
// we will use weak references with the Rc<T> (reference counting pointer) type | |
// weak references allow us to make references to a value that will -not- keep it alive | |
// this is perfect in the intsance of children, as we will soon see | |
use std::rc::{Rc,Weak}; | |
use std::cell::RefCell; | |
// this example builds upon the last by storing a vector of children as well as a parent | |
#[derive(Debug)] | |
struct Node { |
# This file's job is to accept WebSocket connections | |
# and pass along Redis messages to them | |
require 'faye/websocket' | |
class WebSocketBackend | |
def initialize(app) | |
@app = app | |
@clients = [] | |
@running = false |
// Suppose we have a permutation containing N different elements. | |
// Heap found a systematic method for choosing at each step a pair of elements to switch, | |
// in order to produce every possible permutation of these elements exactly once. | |
// Let us describe Heap's method in a recursive way. First we set a counter i to 0. | |
// Now we perform the following steps repeatedly until i is equal to N. | |
// We use the algorithm to generate the (N − 1)! permutations of the first N − 1 elements, | |
// adjoining the last element to each of these. This generates all of the permutations that | |
// end with the last element. Then if N is odd, we switch the first element and the last one, | |
// while if N is even we can switch the i th element and the last one (there is no difference between | |
// N even and odd in the first iteration). We add one to the counter i and repeat. In each iteration, |
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
Follow these steps to install Greybird theme and elementary XFCE icons. This is the default theme in Xubuntu, but not in Debian and other derivatives. The following steps will give you that Xubuntu look in just 2 minutes!
# Install theme
mkdir -p ~/.themes
cd $_
wget https://github.com/shimmerproject/Greybird/archive/master.zip
unzip master.zip
rm master.zip
#!/usr/bin/env bash | |
/Applications/VLC.app/Contents/MacOS/VLC -I rc "$@" |