This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import combinations as comb | |
from pathlib import Path | |
from typing import Union | |
adjacent = [ | |
(1, 0, 0), | |
(0, 1, 0), | |
(0, 0, 1), | |
(-1, 0, 0), | |
(0, -1, 0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from typing import Union | |
from itertools import cycle | |
from dataclasses import dataclass | |
rocks = [ | |
[0b00000, 0b00000, 0b00000, 0b11110], | |
[0b00000, 0b01000, 0b11100, 0b01000], | |
[0b00000, 0b00100, 0b00100, 0b11100], | |
[0b10000, 0b10000, 0b10000, 0b10000], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <Serial.h> | |
#define THRESHOLD 1.23 | |
String states[4] = { | |
"Ready to dock", // Phone is not in cradle || !ps1 & !ps2 & !ds | |
"Docking", // Phone is docking || ps1 & ps2 & !ds | |
"Is Docked", // Phone is docked in cradle || ps1 & ps2 & ds | |
"Ejecting" // Phone is ejecting || ps1 & ps2 & !ds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ts=2:sts=2:sw=2:et | |
#=========================================================== | |
# NTP Configuration Playbook | |
#=========================================================== | |
# This script will remove the 'ntp' daemon from each server | |
# and properly configure the 'systemd-timesyncd' daemon so | |
# that 'timedatectl' uses a specific NTP server. Remember | |
# to create a 'timesyncd.conf' file that holds your config | |
# in the same directory as this ansible playbook before | |
# running. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# So, you want to turn some buttons on... | |
import mido | |
from mido import Message | |
# We're aiming for some specific values. The hex for turning a light green | |
# is pretty simple: 90 <button> <state>. The '90' is the MIDI command | |
# for 'note_on'. The 'note_on' command has two values that come after it: | |
# the note and it's velocity. Since this is a controller, it uses the note | |
# to signify which button to adjust, and it uses velocity to tell it how to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Tue Oct 20 18:24:44 2015] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] | |
[ 2015-10-20 18:24:45.0178 17289/1 age/Wat/WatchdogMain.cpp:1275 ]: Starting Passenger watchdog... | |
[ pid=17289, timestamp=1445365485 ] Process aborted! signo=SIGBUS(10), reason=BUS_ADRALN, si_addr=0x6a918f, randomSeed=1445365485 | |
[ pid=17289 ] Crash log dumped to /var/tmp/passenger-crash-log.1445365485 | |
[ pid=17289 ] Date, uname and ulimits: | |
Tuesday, October 20, 2015 06:24:45 PM UTC | |
SunOS 5.11 11.2 sun4v sparc | |
address space limit (kbytes) (-M) unlimited | |
core file size (blocks) (-c) unlimited | |
cpu time (seconds) (-t) unlimited |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passenger-5.0.20/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb:64:in `flock': Bad file number - /tmp/passenger.nIYEc1p/lock (Errno::EBADF) | |
from /usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passenger-5.0.20/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb:64:in `block in locked?' | |
from /usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passenger-5.0.20/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb:63:in `open' | |
from /usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passenger-5.0.20/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb:63:in `locked?' | |
from /usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passenger-5.0.20/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb:48:in `block (2 levels) in list' | |
from /usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passenger-5.0.20/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb:44:in `each' | |
from /usr/ruby/1.9/lib/ruby/gems/1.9.1/gems/passe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome to the Phusion Passenger Apache 2 module installer, v5.0.18. | |
This installer will guide you through the entire installation process. It | |
shouldn't take more than 3 minutes in total. | |
Here's what you can expect from the installation process: | |
1. The Apache 2 module will be installed for you. | |
2. You'll learn how to configure Apache. | |
3. You'll learn how to deploy a Ruby on Rails application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome to the Phusion Passenger Apache 2 module installer, v5.0.18. | |
This installer will guide you through the entire installation process. It | |
shouldn't take more than 3 minutes in total. | |
Here's what you can expect from the installation process: | |
1. The Apache 2 module will be installed for you. | |
2. You'll learn how to configure Apache. | |
3. You'll learn how to deploy a Ruby on Rails application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from ext/boost/system/system_error.hpp:14:0, | |
from ext/boost/thread/exceptions.hpp:22, | |
from ext/boost/thread/pthread/thread_data.hpp:10, | |
from ext/boost/thread/thread_only.hpp:17, | |
from ext/boost/thread/thread.hpp:12, | |
from ext/boost/thread.hpp:13, | |
from ext/oxt/thread.hpp:28, | |
from ext/common/agent/UstRouter/UstRouterMain.cpp:30: | |
ext/boost/system/error_code.hpp:222:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable] | |
static const error_category & posix_category = generic_category(); |
NewerOlder