Skip to content

Instantly share code, notes, and snippets.

index 9c31b84..6376a42 100644
--- a/module/RegisterInvite/src/Service/RegisterInviteService.php
+++ b/module/RegisterInvite/src/Service/RegisterInviteService.php
@@ -15,21 +15,16 @@ class RegisterInviteService
throw new RegisterException('no invite');
}
- return $this->getServiceLocator()->get('zfcuser_register_form');
+ $form = $this->getServiceLocator()->get('zfcuser_register_form');
+ $form->get('user_id')->setValue($tokenInfo['generic_id']);
@nclundsten
nclundsten / ssh-key-instruct.md
Last active October 14, 2015 00:56
add ssh key to ibm-i (or others)

ssh to the server to set everything up

ssh USERNAME@server.tld

set up home directory

mkdir /home/USERNAME

>chown USERNAME /home/USERNAME

#!/usr/bin/env bash
SINK_SPEAKERS="alsa_output.pci-0000_00_1b.0.analog-stereo"
SINK_HEADPHONES="alsa_output.usb-Logitech_Logitech_G930_Headset-00-Headset.analog-stereo"
pacmd stat | grep "Default sink name" | grep --quiet "$SINK_SPEAKERS"
if [ $? == 0 ]
then
pacmd set-default-sink "$SINK_HEADPHONES" \
@nclundsten
nclundsten / gist:a5cab8aa5d129a3ba693
Created June 23, 2015 02:25
fix nivida fedora 21
if [ $EUID != 0 ]; then
echo "Root privileges required. Trying sudo"
sudo "$0" "$@"
exit $?
fi
yum -y install akmod-nvidia
cat << EOF > /etc/X11/xorg.conf
Section "Device"
Identifier "nvidia"
export HISTSIZE=""
if [ "$PS1" ]; then
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
fi
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1dHgWQCfPmAMMPDPeHr4RcvSpdUaAwyC0Szl6n73fDF7KZEk3cPlp6MSmrMEW4kti81zBSuWayloqkadadkRrXa02P6UAJKfpQtQJoCpDtWgroDzBQ8G6VjouRbqiLz58hUp0K1XbxrxEEIJX46HhlhkkQMBa7YLeg0roiYPEpcsLWrLPTe8xAFLU+6mh0cwFP0/BjUFiAUj2Issa6ZqodkBhLbCgtDmNCpKBulW7/WIIZJ1jkGez60Y2qEp0xhWVpfjQM7RAXixPBQvJ0zIKuB4CHR9z13hdBAlP8UT6bjo6+9asW6QOcskPcpR9smwxoi6Ok4KXyoSM73BRiZrF
Section "Device"
Identifier "nvidia"
Driver "nvidia"
Option "NoLogo" "true"
Option "DPI" "96 x 96"
# Specify Nvidia PCI device
BusID "PCI:1:0:0"
# Make sure X starts also when no outputs are connected to the Nvidia chip
Option "AllowEmptyInitialConfiguration"
EndSection
[nlundsten@localhost ~]$ yum clean all && sudo yum install kmod-nvidia
Loaded plugins: langpacks
Cleaning repos: fedora google-chrome google-talkplugin mysql56-community rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree rpmfusion-nonfree-updates updates
Cleaning up everything
[sudo] password for nlundsten:
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package kmod-nvidia.x86_64 1:346.35-1.fc21 will be installed
--> Processing Dependency: kmod-nvidia-3.18.2-200.fc21.x86_64 >= 1:346.35-1.fc21 for package: 1:kmod-nvidia-346.35-1.fc21.x86_64
[nlundsten@localhost ~]$ uname -r
3.17.8-300.fc21.x86_64
[nlundsten@localhost ~]$ sudo yum install kmod-nvidia-3.17.8-300.fc21.x86_64-343.36-1.fc21.2
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package kmod-nvidia-3.17.8-300.fc21.x86_64.x86_64 1:343.36-1.fc21.2 will be installed
--> Processing Dependency: nvidia-kmod-common >= 1:343.36 for package: 1:kmod-nvidia-3.17.8-300.fc21.x86_64-343.36-1.fc21.2.x86_64
--> Running transaction check
---> Package xorg-x11-drv-nvidia.x86_64 1:346.35-1.fc21 will be installed
ansible-playbook -i ansible/production.hosts -u deploy ansible/deploy.yml --limit staging
ansible-playbook -i ansible/production.hosts -u deploy ansible/deploy.yml --limit production