If you have a Linux machine with KVM on it, you can manage those VMs remotely from a Mac using virt-manager.
SSH to the Linux machine and add your SSH user to the libvirt group
sudo usermod -a -G libvirt $(whoami)
| App.js | |
| import React, { Component } from 'react'; | |
| import TaskList from './TaskList'; | |
| import AddTask from './AddTask'; | |
| export default class App extends Component { | |
| render() { | |
| return ( | |
| <div> |
| // state looks like this | |
| { | |
| userIds: [ 1, 2], | |
| usersById: { | |
| 1: { | |
| name: 'Jakub' | |
| }, | |
| 2: { | |
| name: 'Horsebeast' | |
| } |
| SCrypt::Ext.instance_eval do | |
| def crypto_scrypt(secret, secret_bytesize, salt, salt_bytesize, n, r, p, buffer, key_len) | |
| # buffer is a FFI::MemoryPointer | |
| buffer.write_string secret | |
| 0 # retval | |
| end | |
| end |
| class CreateResidences < ActiveRecord::Migration | |
| def change | |
| create_table :residences do |t| | |
| t.string :name | |
| t.string :address | |
| t.belongs_to :zipcode, index: true | |
| t.timestamps null: false | |
| end | |
| add_foreign_key :residences, :zipcodes |
| #!/bin/bash | |
| # Usage: ./filename frequency_in_seconds folder_path | |
| # If the script doesn't work, you may need imagemagick: | |
| # $ sudo apt-get install imagemagick | |
| x=1 | |
| if [[ -f ${2}/screenshot1.png ]]; then |
| class('Test') | |
| function Test:__init() | |
| self.timer = Timer() | |
| math.randomseed(1234) | |
| Events:Subscribe("PreTick", self, self.Tick) | |
| end | |
| function Test:Tick() | |
| if self.timer:GetMilliseconds() < 300 then |
| function WPB:Render() | |
| for i,pos in ipairs(self.waypoints) do | |
| local angle = Angle( Camera:GetAngle().yaw, 0, math.pi ) * Angle( math.pi, 0, 0 ) | |
| Render:SetTransform(Transform3():Translate(pos):Rotate( angle )) | |
| Render:DrawCircle(Vector3(0,0,0), 2, Color(200, 200, 200)) | |
| local text = tostring(i) | |
| local text_size = Render:GetTextSize( text, TextSize.Large ) / 10 |
| upstream unicorn_wrh { | |
| server unix:/tmp/unicorn.wrh.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name hostname.tld; | |
| root /home/deployer/apps/wrh/current/public; | |
| location ^~ /assets/ { |
| require 'net-ssh-shell' | |
| require 'net-ssh' | |
| Trying to run: | |
| $ ruby deploy.rb udp 10 oi10osm edu/dod/lab1 1 ↵ | |
| /Users/orvar/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate net-ssh-shell-0.2.0, because net-ssh-2.6.0 conflicts with net-ssh (~> 2.1.0) (Gem::LoadError) | |
| from /Users/orvar/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate' | |
| from /Users/orvar/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate' | |
| from /Users/orvar/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems.rb:209:in `try_activate' | |
| from /Users/orvar/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require' |