Skip to content

Instantly share code, notes, and snippets.

View vicatcu's full-sized avatar

Victor Aprea vicatcu

View GitHub Profile
SPEC
describe "when a membeship is created" do
let!(:another_membership) { FactoryGirl.create(:membership, user: user, membership_type: membertype,
start: Date.parse("2013-11-15")) }
context "if there are other memberships associated with user" do
it "sets the end date for any of them that have a nil end date" do
expect(Membership.find_by(start: Date.parse("2012-11-15"))).not_to be_nil
VirtualHost configuration:
*:80 is a NameVirtualHost
default server ithacagenerator.org (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost ithacagenerator.org (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost bugzilla.ithacagenerator.org (/etc/apache2/sites-enabled/bugzilla.ithacagenerator.org.conf:4)
alias bugzilla.ithacagenerator.is-very-nice.org
port 80 namevhost drupal.ithacagenerator.org (/etc/apache2/sites-enabled/drupal.ithacagenerator.org.conf:4)
alias drupal.ithacagenerator.is-very-nice.org
port 80 namevhost phpmyadmin.ithacagenerator.org (/etc/apache2/sites-enabled/phpmyadmin.ithacagenerator.org.conf:4)
alias phpmyadmin.ithacagenerator.is-very-nice.org
#
# wiki.ithacagenerator.org (/etc/apache2/sites-available/wiki.ithacagenerator.org)
#
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName wiki.ithacagenerator.org
ServerAlias wiki.ithacagenerator.is-very-nice.org
# Indexes + Directory Root.
DirectoryIndex index.html
*:80 is a NameVirtualHost
default server ithacagenerator.org (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost ithacagenerator.org (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost bugzilla.ithacagenerator.org (/etc/apache2/sites-enabled/bugzilla.ithacagenerator.org.conf:4)
alias bugzilla.ithacagenerator.is-very-nice.org
port 80 namevhost drupal.ithacagenerator.org (/etc/apache2/sites-enabled/drupal.ithacagenerator.org.conf:4)
alias drupal.ithacagenerator.is-very-nice.org
port 80 namevhost phpmyadmin.ithacagenerator.org (/etc/apache2/sites-enabled/phpmyadmin.ithacagenerator.org.conf:4)
alias phpmyadmin.ithacagenerator.is-very-nice.org
port 80 namevhost wiki.ithacagenerator.org (/etc/apache2/sites-enabled/wiki.ithacagenerator.org.conf:4)
@vicatcu
vicatcu / daycounter_example.ino
Created October 31, 2013 16:32
displayTime function using 4 day chained counters
#include <DayCounter.h>
#include <ShiftRegister.h>
/* * * * * * * * * * * * * * * * * *
* pin 5 = DayCounter.SER (data) *
* pin 7 = DayCounter.CLK (clock) *
* pin 9 = DayCounter.RCK (latch) *
* * * * * * * * * * * * * * * * * */
DayCounter dc(5, 7, 9);
int count = 0;
@vicatcu
vicatcu / tftpd-hpa-cmd-fail
Created September 29, 2012 05:09
tftpd command fail
vic@VictorAsus:~$ /etc/init.d/tftpd-hpa restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service tftpd-hpa restart
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop tftpd-hpa ; start tftpd-hpa. The restart(8) utility is also available.
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.123" (uid=1000 pid=5383 comm="stop tftpd-hpa ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")